Compiler should prevent methods/functions without RETURN statement

Status
Not open for further replies.
L

Lieven De Foor

Guest
The compiler should prohibit (or at least warn about) non void methods/functions that have no RETURN statement on every possible execution path. In Java, such code doesn't even compile. In ABL, when you forget a RETURN x. statement, you don't get any warning, while the method always returns ?. This check could be part of a new "strict compile" option, which should be on by default...

Continue reading...
 
Status
Not open for further replies.
Top