[ 
https://issues.apache.org/jira/browse/NETBEANS-807?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16515525#comment-16515525
 ] 

Reema Taneja commented on NETBEANS-807:
---------------------------------------

Also cover:
iI) IntBinaryOperator calc3 = (var x, y ) -> x + y;
Actual Result: IntBinaryOperator calc3 = (var int x, yint ) -> x + y;

iii)IntBinaryOperator calc3 = (var x, int y) -> x + y;

Actual Result : IntBinaryOperator calc3 = (var int x, int int y) -> x + y;

iv) IntBinaryOperator calc4 = (  x,  var y ) -> x + y;

v) IntBinaryOperator calc5 = (int x, var y) -> x + y;

Actual Result:

java.lang.AssertionError: unexpected type: <any?>
at jdk.compiler/com.sun.tools.javac.tree.TreeMaker.Type(TreeMaker.java:787)
at 
org.netbeans.modules.java.source.builder.TreeFactory.Type(TreeFactory.java:800)
at org.netbeans.api.java.source.TreeMaker.Type(TreeMaker.java:1083)
at org.netbeans.modules.java.hints.suggestions.Lambda$

AddExplicitLambdaParameterTypes.performRewrite(Lambda.java:627)





> New Error Rule required for fixing invalid lambda expression parameters in 
> JDK-11
> ---------------------------------------------------------------------------------
>
>                 Key: NETBEANS-807
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-807
>             Project: NetBeans
>          Issue Type: Improvement
>            Reporter: Reema Taneja
>            Assignee: ARUNAVA SINHA
>            Priority: Major
>              Labels: JDK11-VarInLambda
>
> IntBinaryOperator f3 = (int x, var y) -> x + y;
> Displays below error
>   (cannot mix 'var' and explicitly-typed parameters)
> Proposed Error Rule would do the below fix
> IntBinaryOperator f3 = (var x, var y) -> x + y;
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
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