Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Number of attachments :
Description
Arno
I have created a bunch of test cases related to loop
processing in Janino. I also created a patch that
seems to fix all the loop related bugs that I was
running into. The patch and test files can be
found here:
http://www.modejong.com/tcljava/janino/
This patch fixes almost every case where Janino
was incorrectly generating an error in my code.
Thank you for the HUGE bunch of test cases. I agree with you: The FOR updates are definitely unreachable (so JANINO is right to issue an error), but JAVAC just kicks them out. I believe it is not a good idea to silently ignore code that the programmer has written, because this almost certainly a programming error.
I changed Janino's behavior such that it ignores the unreachable update, but issues a warning (use "-warn:*" to turn warnings on).
I checked the patch that you proposed, but found a much simpler solution for
JANINO-54:No more "keepCompiling" and "followingStatementsAreDead".
JANINO-54: