sarveshkesharwani opened a new pull request #1071: [NETBEANS-1728] fix for 
Exception encountered when break returns value
URL: https://github.com/apache/incubator-netbeans/pull/1071
 
 
   In JDK 12, when we try to return a value with a break statement, (for 
example in a switch statement), for eg. 
   `String str = switch(i) {
               case 1 :
                   System.out.println("one");
                   break "one";
               default :
                   System.out.println("def");
                   break "def";
   };`
   
   Now, in such a scenario, the break target forms an Expression Tree, whereas, 
a Statement Tree is expected wherever it is being called from (for eg., 
IfToSwitchSupport).
   I have tested the existing functionalities like switching from If to Switch, 
and the hint for no value being returned in the above scenario gives the 
appropriate hint too (missing break value) .

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

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

Reply via email to