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...
Good point, this kind of errors leaves a developer without a clue as why their sources don't do what they expect it to do.
See also https://goo.gl/veEHFh for an idea for the '-strict' parameter.
Look at all these votes!
Surely this isn't that hard to implement?
It wouldn't surprise me if they want to handle this via the strict compiler options. That might be the reason you haven't heard anything yet.
Let's hope they do Patrick. Is there a list available on what strict compile options are now available in 11.7?
This doesn't appear to be on the strict compile list for 11.7... Any chance to pick this up for OE 12? Anyone from Progress reading this?
Hey, just noticed the "Coming Soon" tag, which is probably OE 12?
The SonarLint functionality using Riverside plugin/rules is indeed detecting this already, and since that is will be in the box, I assume this is checked that way...