You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Eric Milles (Jira)" <ji...@apache.org> on 2021/03/02 20:14:00 UTC

[jira] [Updated] (GROOVY-4727) Adding "return" automatically in nested switch statements

     [ https://issues.apache.org/jira/browse/GROOVY-4727?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eric Milles updated GROOVY-4727:
--------------------------------
    Fix Version/s: 3.0.8

> Adding "return" automatically in nested switch statements
> ---------------------------------------------------------
>
>                 Key: GROOVY-4727
>                 URL: https://issues.apache.org/jira/browse/GROOVY-4727
>             Project: Groovy
>          Issue Type: Bug
>          Components: Compiler
>    Affects Versions: 1.9-beta-1, 2.4.0-rc-1
>            Reporter: Roshan Dawrani
>            Assignee: Eric Milles
>            Priority: Major
>             Fix For: 3.0.8, 4.0.0-alpha-3
>
>
> The following does not work. See: http://markmail.org/message/ekm45sghpzh227ga
> {code}
> assert foo('x1', 'y1') == 'r1'
> def foo(x, y) {
>     switch(x) {
>         case 'x1':
>             switch(y) {
>                 case 'y1':
>                     'r1';
>                     break;
>                 case 'y2':
>                     'r2';
>                     break;
>             }
>     }
> }
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)