Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8312814

Compiler crash when template processor type is a captured wildcard

XMLWordPrintable

    • 21
    • b09

        Code sample:

        import java.util.List;

        public class Demo {

            void x(List<? extends StringTemplate.Processor<String,
        RuntimeException>> list) {
                list.get(0)."";
            }
        }

        Output (build 22-ea+7-489):
        java: An exception has occurred in the compiler (22-ea). Please file a
        bug against the Java compiler via the Java bug reporting page
        (https://bugreport.java.com) after checking the Bug Database
        (https://bugs.java.com) for duplicates. Include your program, the
        following diagnostic, and the parameters passed to the Java compiler
        in your report. Thank you.
        java: java.lang.AssertionError: <captured wildcard>.process
        java: at jdk.compiler/com.sun.tools.javac.util.Assert.error(Assert.java:162)
        java: at jdk.compiler/com.sun.tools.javac.code.Symbol$MethodSymbol.<init>(Symbol.java:1942)
        java: at jdk.compiler/com.sun.tools.javac.code.Symbol$MethodSymbol$1.<init>(Symbol.java:1948)
        java: at jdk.compiler/com.sun.tools.javac.code.Symbol$MethodSymbol.clone(Symbol.java:1948)
        java: at jdk.compiler/com.sun.tools.javac.code.Symbol$MethodSymbol.clone(Symbol.java:1918)
        java: at jdk.compiler/com.sun.tools.javac.jvm.Gen.binaryQualifier(Gen.java:265)
        java: at jdk.compiler/com.sun.tools.javac.jvm.Gen.visitSelect(Gen.java:2388)
        java: at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCFieldAccess.accept(JCTree.java:2581)
        java: at jdk.compiler/com.sun.tools.javac.jvm.Gen.genExpr(Gen.java:885)
        java: at jdk.compiler/com.sun.tools.javac.jvm.Gen.visitApply(Gen.java:1921)

              jlaskey Jim Laskey
              tvaleev Tagir Valeev
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: