A code example inducing the runtime error from compiler:
- The two declaration lines and their order is important.
- The parameter passing mode is important.
Type UDT Extends Object Declare Virtual Sub s1 (Byref As Integer) Declare Virtual Sub s2 (Byref As Integer = 0) End Type Dim As UDT u u.s2()
For more information, see forum at:
http://www.freebasic.net/forum/viewtopic.php?f=3&t=24957
https://sourceforge.net/p/fbc/bugs/732/
https://sourceforge.net/p/fbc/bugs/725/
Other information:
This bug appeared with version 1.00.0 of fbc.
This bug seems now to be fixed, maybe by the fix:
fbc: fix compiler fault when accessing this.member
( https://github.com/freebasic/fbc/commit/79d17a3e1f9c2013402722e4f42267849b2a2b2e )
Last edit: fxm (freebasic.net) 2022-01-19
Yes, I believe this was fixed. Or at the very least, changed due to other work on the compiler.
I think can be closed.