Open viega opened 1 year ago
Do control flow analysis to be able to detect statically when a variable can be referenced before assignment. Right now, this is a runtime error, and it doesn't need to be.
Also should make sure w/ this analysis it's fine to have:
if (x) { y = 2 } else { y = 4 } echo(string(y))
Right now, you'd need to put y = 0 at the top.
y = 0
Do control flow analysis to be able to detect statically when a variable can be referenced before assignment. Right now, this is a runtime error, and it doesn't need to be.