Community
Participate
Working Groups
The following EGL results in java with compile errors being generated. // basic program // program pgm2 type BasicProgram {} function main() f1(); end function f1() returns (boolean) if (1 == 2) return (true); end end end The java generated for function f1() is as follows (notice that there is no return statement generated outside of the IF block: public boolean f1() { if (((short) 1 == (short) 2)) { return true; } }
lowering to P3 as this is not a stopper
This problem is because there is no analysis logic built into EDT to determine when to 1) add return statements or 2) remove dead code.
Browsing bugs I stumpled upon this one and wondered what the desired outcome of the EGL code would be. Might be because I'm new to EGL, but I would assume an EGL-compile-error, from this statement. (for the same reason the Java compiler generate an error) Anyway you might as well do: function f1() returns (boolean) return(1==2) end
Deferring to Future. This won't be done in 0.8.2.