| Summary: | Unlabeled exit in "if" statement results in "return;" | ||||||
|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Scott Greer <greer> | ||||
| Component: | EDT | Assignee: | Project Inbox <edt.javagen-inbox> | ||||
| Status: | CLOSED FIXED | QA Contact: | |||||
| Severity: | major | ||||||
| Priority: | P3 | CC: | jeffdouglas | ||||
| Version: | unspecified | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
Logic has been added to check for this situation Verified. |
Created attachment 200522 [details] FVT testcase In TestExitStatementLib (from the FVT testcases), there's this test: // Test default exit within IF block counter = 1; if ( true ) exit; counter = 0; end Both Java and JavaScript generators produce code that replace the unlabeled exit with a return statement, e.g. counter = 1; EzeLabel_7: if (true) { return ; counter = 0; } I've attached the FVT testcase.