bcc icon indicating copy to clipboard operation
bcc copied to clipboard

Using the unqualified name of a nested type in member declarations causes compile errors

Open HurryStarfish opened this issue 6 years ago • 2 comments

SuperStrict
Framework BRL.Blitz

Local o1:T1.T2 = T1.Glob
Local o2:T1.T2 = New T1.fld
Local o3:T1.T2 = T1.Func()
Local o4:T1.T2 = New T1.Meth()

Type T1
	Type T2
	End Type
	
	Global Glob:T2 = New T2
	
	Field fld:T2 = New T2
		
	Function Func:T2()
		Return New T2
	End Function
	
	Method Meth:T2()
		Return New T2
	End Method
End Type

Compile Error: Unable to convert from T2 to T1.

When T1 is moved into a different file (or a module) and imported, the error turns into

Compile Error: Type 't2' not found

HurryStarfish avatar May 20 '18 18:05 HurryStarfish