bcc
bcc copied to clipboard
Duplicate method definition not thrown when calling it in itself
I accidentally overloaded a method with the same method definition (the the one missing some params should call the other with defaults). When removing the M(i)
bcc fails with a proper error message ... but with this call it continues compilation until it fails then in C.
SuperStrict
Framework Brl.Color
Type TTest
Method M:Int(i:Int)
M(i)
End Method
Method M:Int(i:Int)
End Method
End Type
received error:
Building untitled1
[ 93%] Compiling:untitled1.bmx.console.debug.linux.x64.c
/BlitzMaxNG/tmp/.bmx/untitled1.bmx.console.debug.linux.x64.c:36:7: error: redefinition of â__m_untitled1_TTest_M_iâ
BBINT __m_untitled1_TTest_M_i(struct _m_untitled1_TTest_obj* o,BBINT bbt_i){
^~~~~~~~~~~~~~~~~~~~~~~
/BlitzMaxNG/tmp/.bmx/untitled1.bmx.console.debug.linux.x64.c:7:7: note: previous definition of â__m_untitled1_TTest_M_iâ was here
BBINT __m_untitled1_TTest_M_i(struct _m_untitled1_TTest_obj* o,BBINT bbt_i){
^~~~~~~~~~~~~~~~~~~~~~~
Build Error: failed to compile (256) /BlitzMaxNG/tmp/.bmx/untitled1.bmx.console.debug.linux.x64.c
Process complete
expected error:
Compile Error: Duplicate declaration Method TTest.M:Int(i:Int)