bcc
bcc copied to clipboard
Compile error with mutually recursive generics
SuperStrict
Framework BRL.Blitz
Local o:T1<Int>
Type T1<X>
Field f:T2<X>
End Type
Type T2<X>
Field f:T1<T2<X>>
End Type
If compiled in debug mode, bcc throws a Null Object Exception. If compiled in release mode, the error message starts off like this:
C:/Programmierung/BlitzMax-NG/tmp/.bmx/untitled5.bmx.console.release.win32.x64.c: In function '__m_untitled5_T1_New': C:/Programmierung/BlitzMax-NG/tmp/.bmx/untitled5.bmx.console.release.win32.x64.c:161:3: error: dereferencing pointer to incomplete type 'struct _m_untitled5_T1_obj' o->clas = &_m_untitled5_T1; ^ C:/Programmierung/BlitzMax-NG/tmp/.bmx/untitled5.bmx.console.release.win32.x64.c:161:13: error: '_m_untitled5_T1' undeclared (first use in this function) o->clas = &_m_untitled5_T1; ^