You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "Reema Taneja (JIRA)" <ji...@apache.org> on 2018/07/04 05:37:00 UTC
[jira] [Created] (NETBEANS-1021) Convert to explicit type hint
throws exception for invalid lambda params types
Reema Taneja created NETBEANS-1021:
--------------------------------------
Summary: Convert to explicit type hint throws exception for invalid lambda params types
Key: NETBEANS-1021
URL: https://issues.apache.org/jira/browse/NETBEANS-1021
Project: NetBeans
Issue Type: Task
Reporter: Reema Taneja
Assignee: Reema Taneja
Convert to explicit type hint throws below exception if lambda expression uses a mix of explicit and implicit var type((support added in jdk11)) params.
Eg. IntBinaryOperator op = (int x, var y) -> x+ y;
If lambda expr params are like (int x, y), i.e. mix of explicit and implicit params, Convert to
explicit type hint is not shown.
Investigate if we can convert to explicit type for all mixed types params containing var type or hide the hint.
Exception:
java.lang.AssertionError: unexpected type: <any?>
at jdk.compiler/com.sun.tools.javac.tree.TreeMaker.Type(TreeMaker.java:788)
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)
at org.netbeans.spi.java.hints.JavaFix$1.process(JavaFix.java:171)
at org.netbeans.modules.java.hints.spiimpl.JavaFixImpl$1.run(JavaFixImpl.java:80)
at org.netbeans.modules.java.hints.spiimpl.JavaFixImpl$1.run(JavaFixImpl.java:74)
at org.netbeans.api.java.source.JavaSource$1.run(JavaSource.java:672)
at org.netbeans.api.java.source.JavaSource$1.run(JavaSource.java:662)
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
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