You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "ARUNAVA SINHA (JIRA)" <ji...@apache.org> on 2019/07/16 09:09:00 UTC

[jira] [Created] (NETBEANS-2854) ErrorHint to convert break statement to yield statement for switch expression in JDK-13

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-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

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