Compiler bug

Howard Lovatt howard.lovatt at gmail.com
Tue Sep 3 20:20:49 PDT 2013


Hi,

When I compile:

  @FunctionalInterface
  public interface Action1Bug<E1> {
    void act(E1 e1) throws Exception;
    static Action1Bug none = (notUsed) -> {};
  }


With:

sunzero-ln:Downloads lov080$ java -version
java version "1.8.0-ea"
Java(TM) SE Runtime Environment (build 1.8.0-ea-b88)
Java HotSpot(TM) 64-Bit Server VM (build 25.0-b30, mixed mode)


I get:

/Users/lov080/Google
Drive/Personal/Java/examples/CyclicBarrierTest/src/cyclicbarriertest/Action1Bug.java:4:
warning: [rawtypes] found raw type: Action1Bug
    static Action1Bug none = (notUsed) -> {};
  missing type arguments for generic class Action1Bug<E1>
  where E1 is a type-variable:
    E1 extends Object declared in interface Action1Bug
An exception has occurred in the compiler (1.8.0-ea). Please file a bug at
the Java Developer Connection (http://java.sun.com/webapps/bugreport)
 after checking the Bug Parade for duplicates. Include your program and the
following diagnostic in your report.  Thank you.
java.lang.NullPointerException
at com.sun.tools.javac.jvm.Code.emitop0(Code.java:538)
at com.sun.tools.javac.jvm.Items$SelfItem.load(Items.java:367)
at com.sun.tools.javac.jvm.Gen.genArgs(Gen.java:913)
at com.sun.tools.javac.jvm.Gen.visitApply(Gen.java:1751)
at
com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept(JCTree.java:1440)
at com.sun.tools.javac.jvm.Gen.genExpr(Gen.java:894)
at com.sun.tools.javac.jvm.Gen.visitAssign(Gen.java:1888)
at com.sun.tools.javac.tree.JCTree$JCAssign.accept(JCTree.java:1652)
at com.sun.tools.javac.jvm.Gen.genExpr(Gen.java:894)
at com.sun.tools.javac.jvm.Gen.visitExec(Gen.java:1698)
at
com.sun.tools.javac.tree.JCTree$JCExpressionStatement.accept(JCTree.java:1271)
at com.sun.tools.javac.jvm.Gen.genDef(Gen.java:684)
at com.sun.tools.javac.jvm.Gen.genStat(Gen.java:719)
at com.sun.tools.javac.jvm.Gen.genStat(Gen.java:705)
at com.sun.tools.javac.jvm.Gen.genStats(Gen.java:756)
at com.sun.tools.javac.jvm.Gen.visitBlock(Gen.java:1094)
at com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java:884)
at com.sun.tools.javac.jvm.Gen.genDef(Gen.java:684)
at com.sun.tools.javac.jvm.Gen.genStat(Gen.java:719)
at com.sun.tools.javac.jvm.Gen.genMethod(Gen.java:969)
at com.sun.tools.javac.jvm.Gen.visitMethodDef(Gen.java:942)
at com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:771)
at com.sun.tools.javac.jvm.Gen.genDef(Gen.java:684)
at com.sun.tools.javac.jvm.Gen.genClass(Gen.java:2356)
at com.sun.tools.javac.main.JavaCompiler.genCode(JavaCompiler.java:753)
at com.sun.tools.javac.main.JavaCompiler.generate(JavaCompiler.java:1547)
at com.sun.tools.javac.main.JavaCompiler.generate(JavaCompiler.java:1511)
at com.sun.tools.javac.main.JavaCompiler.compile2(JavaCompiler.java:909)
at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:868)
at com.sun.tools.javac.main.Main.compile(Main.java:516)
at com.sun.tools.javac.main.Main.compile(Main.java:376)
at com.sun.tools.javac.main.Main.compile(Main.java:365)
at com.sun.tools.javac.main.Main.compile(Main.java:356)
at com.sun.tools.javac.Main.compile(Main.java:76)
at com.sun.tools.javac.Main.main(Main.java:61)


  -- Howard.


More information about the lambda-dev mailing list