Uncaught compiler error causes semi-random crash
Archives Forums/BlitzMax Bug Reports/Uncaught compiler error causes semi-random crash
| ||
OK this one was fun to debug!Type randomtype End Type Type brokentype Field randomtype:randomtype = New randomtype End Type broken:brokentype = New brokentype Notify "It worked!" WaitMouse End Now, this code shouldn't compile because a field name is the same as a type name, which I have learnt is a no no. This would produce a compiler error if the field were a local/global var but as a field it changes the compiler behaviour. When reaching the New Backdrop line the debugger will throw an unhandled memory exception or whatever error. Stepping through the code will show the error as happenning in a completely unrelated section of code. |