[condy-folding] Error compiling lambda with condyForLambda
Tagir Valeev
amaembo at gmail.com
Sun Oct 15 13:36:57 UTC 2017
Hello!
Tried to play with condyForLambda feature.
$ cat LambdaCondy.java
import java.util.stream.*;
public class LambdaCondy {
public static void main(String[] args) {
System.out.println(IntStream.of(1,2,3).reduce((a,b) -> a+b));
}
}
$ javac -source 10 -XDcondyForLambda -XDdoConstantFold LambdaCondy.java
An exception has occurred in the compiler (10-internal). Please file a
bug against the Java compiler via the Java bug reporting page
(http://bugreport.java.com) after checking the Bug Database
(http://bugs.java.com) for duplicates. Include your program and the
following diagnostic in your report. Thank you.
java.lang.AssertionError
at jdk.compiler/com.sun.tools.javac.code.Symbol.clone(Symbol.java:288)
at jdk.compiler/com.sun.tools.javac.jvm.Gen.binaryQualifier(Gen.java:247)
at jdk.compiler/com.sun.tools.javac.jvm.Gen.visitIdent(Gen.java:2070)
at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCIdent.accept(JCTree.java:2241)
at jdk.compiler/com.sun.tools.javac.jvm.Gen.genExpr(Gen.java:818)
at jdk.compiler/com.sun.tools.javac.jvm.Gen.genArgs(Gen.java:837)
at jdk.compiler/com.sun.tools.javac.jvm.Gen.visitApply(Gen.java:1664)
at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept(JCTree.java:1632)
at jdk.compiler/com.sun.tools.javac.jvm.Gen.genExpr(Gen.java:818)
at jdk.compiler/com.sun.tools.javac.jvm.Gen.genArgs(Gen.java:837)
at jdk.compiler/com.sun.tools.javac.jvm.Gen.visitApply(Gen.java:1664)
at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept(JCTree.java:1632)
at jdk.compiler/com.sun.tools.javac.jvm.Gen.genExpr(Gen.java:818)
at jdk.compiler/com.sun.tools.javac.jvm.Gen.visitExec(Gen.java:1582)
at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCExpressionStatement.accept(JCTree.java:1450)
at jdk.compiler/com.sun.tools.javac.jvm.Gen.genDef(Gen.java:596)
at jdk.compiler/com.sun.tools.javac.jvm.Gen.genStat(Gen.java:631)
at jdk.compiler/com.sun.tools.javac.jvm.Gen.genStat(Gen.java:617)
at jdk.compiler/com.sun.tools.javac.jvm.Gen.genStats(Gen.java:668)
at jdk.compiler/com.sun.tools.javac.jvm.Gen.visitBlock(Gen.java:1030)
at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java:1018)
at jdk.compiler/com.sun.tools.javac.jvm.Gen.genDef(Gen.java:596)
at jdk.compiler/com.sun.tools.javac.jvm.Gen.genStat(Gen.java:631)
at jdk.compiler/com.sun.tools.javac.jvm.Gen.genMethod(Gen.java:902)
at jdk.compiler/com.sun.tools.javac.jvm.Gen.visitMethodDef(Gen.java:865)
at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:866)
at jdk.compiler/com.sun.tools.javac.jvm.Gen.genDef(Gen.java:596)
at jdk.compiler/com.sun.tools.javac.jvm.Gen.genClass(Gen.java:2197)
at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.genCode(JavaCompiler.java:752)
at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.generate(JavaCompiler.java:1633)
at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.generate(JavaCompiler.java:1601)
at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:969)
at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:305)
at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:165)
at jdk.compiler/com.sun.tools.javac.Main.compile(Main.java:57)
at jdk.compiler/com.sun.tools.javac.Main.main(Main.java:43)
Sorry if this feature is not supposed to work right now.
With best regards,
Tagir Valeev
More information about the amber-dev
mailing list