bmx-ng / bcc

A next-generation bcc parser for BlitzMax
zlib License
33 stars 13 forks source link

Overloaded New in imported file broken #596

Closed GWRon closed 1 year ago

GWRon commented 1 year ago

This is just for tracking purposes (dunno if Bruce was aware of the followup-chat on discord).

The latest commit planned to fix #595 but now spits out different error messages

test_imp.bmx

SuperStrict

Type TBase
    Method New(overloaded:String)
    End Method
End Type

test.bmx

SuperStrict

Framework Brl.StandardIO
Import "test_imp.bmx"

Type TExt Extends TBase
End Type

output:

Building test
[  9%] Processing:test_imp.bmx
[ 10%] Processing:test.bmx
[ 90%] Compiling:test_imp.bmx.release.linux.x64.c
[ 91%] Compiling:test.bmx.console.release.linux.x64.c
In file included from /Testcodes/bmx tests/.bmx/test.bmx.console.release.linux.x64.c:1:0:
/Testcodes/bmx tests/.bmx/test.bmx.console.release.linux.x64.h:9:6: error: conflicting types for ‘__m_test_imp_TBase_New_S’
 void __m_test_imp_TBase_New_S(struct _m_test_TExt_obj* o,BBSTRING bbt_overloaded);
      ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /Testcodes/bmx tests/.bmx/test.bmx.console.release.linux.x64.h:6:0,
                 from /Testcodes/bmx tests/.bmx/test.bmx.console.release.linux.x64.c:1:
/Testcodes/bmx tests/.bmx/test_imp.bmx.release.linux.x64.h:8:6: note: previous declaration of ‘__m_test_imp_TBase_New_S’ was here
 void __m_test_imp_TBase_New_S(struct _m_test_imp_TBase_obj* o,BBSTRING bbt_overloaded);
      ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /Testcodes/bmx tests/.bmx/test.bmx.console.release.linux.x64.c:1:0:
/Testcodes/bmx tests/.bmx/test.bmx.console.release.linux.x64.h:10:26: error: conflicting types for ‘__m_test_imp_TBase_New_S_ObjectNew’
 struct _m_test_TExt_obj* __m_test_imp_TBase_New_S_ObjectNew(BBClass * clas,BBSTRING bbt_overloaded);
                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[...]