Code: Select all
type thing
enum myEnum
STUFF = 1
end enum
dim value as integer
declare constructor()
declare function setDefault() as integer
end type
constructor thing()
print "setting constructor"
this.value = this.setDefault()
end constructor
function thing.setDefault() as integer
dim retVal as integer
print "entering with"
with thing
print "SUCCESS"
retVal = .STUFF
end with
return retVal
end function
dim test as thing
sleep
But, bizarrely, "with" is calling the constructor to the type, creating an infinite loop. Surely this is a bug?
I am using fb 1.09 compiler.