bcc
bcc copied to clipboard
Using the unqualified name of a nested type in member declarations causes compile errors
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