ARUNAVA SINHA created NETBEANS-2854:
---------------------------------------

             Summary: ErrorHint to convert break statement to yield statement 
for switch expression in JDK-13
                 Key: NETBEANS-2854
                 URL: https://issues.apache.org/jira/browse/NETBEANS-2854
             Project: NetBeans
          Issue Type: Bug
          Components: java - Hints
    Affects Versions: 11.2
            Reporter: ARUNAVA SINHA
            Assignee: ARUNAVA SINHA


Suppose someboby has used below switch Expression in JDK -12

a = switch (a) {
default: break 5;

}

But once me migrate to JDK-13, this will not work as break statement needs to 
be replaced with yield statement

Below error is displayed:

';' expected
attempt to break out of a switch expression

 

Expected transformation:

a = switch (a) {
default: yield 5;

}



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to