| Summary: | Switch-case Return | ||
|---|---|---|---|
| Product: | [Modeling] Epsilon | Reporter: | Henning <Hager.Henning> |
| Component: | Core | Assignee: | Dimitris Kolovos <dkolovos> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Mac OS X - Carbon (unsup.) | ||
| Whiteboard: | |||
Fixed in the SVN and in the latest interim version (0.8.9.201010171057) Fixed in 0.9.0. |
When placing a return in a case of a switch statement the owning operation is not immediately left. The following code demonstrates this behavior: rule switchexample transform d : Source!Domain to d : Target!Domain{ callSomeOperation().println(); } operation callSomeOperation() : String{ var choice = "choice_1"; switch (choice){ case "choice_1": "choice detected".println(); return "first choice chosen!"; } return "nothing chosen"; } The output should be "choice detected" but instead it is "choice detected" and "nothing chosen".