Euphoria
Ticket #150:
Forward calls to function without assigning causes crash
-
Reported by
mattlewis
Apr 10, 2010
When a function is called as a forward reference, but the value isn't assigned, the program crashes:
fwd_assign()
function fwd_assign()
return 1
end function
Details
1. Comment by mattlewis
Apr 10, 2010
Added test in tests/t_fwd.e in svn:3148.
2. Comment by mattlewis
Apr 11, 2010
Fixed the forward reference code and removed previous "bad" test that assumed this didn't work.
3. Comment by jimcbrown
Apr 11, 2010
You mean that you added a new, corrected and improved, test to ensure that this bug is caught if it recurrs in the future?
Or did you just remove the test? Why?
4. Comment by mattlewis
Apr 11, 2010
I added a test that was meant to pass to t_fwd.e. I removed t_c_fwd_bad.e (or whatever it actually was) that I suspect was put in there before a function return result could be ignored. Once I corrected the forward referencing bug, that test wasn't crashing, and was therefore a failure.
Basically, I just moved that test to the right place.