java.lang.AssertionError: C<C>: [TYPE_REFERENCE] - []

YouTrack | 9 months ago
  1. 0

    AE from DescriptorResolver

    YouTrack | 9 months ago
    java.lang.AssertionError: C<C>: [TYPE_REFERENCE] - []
  2. 0

    FULL PRODUCT VERSION : A DESCRIPTION OF THE PROBLEM : Compiling the two attached trivial classes leads to the following compiler-failure: An exception has occurred in the compiler (1.8.0_91). 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: isSubClass C at com.sun.tools.javac.code.Symbol.isSubClass(Symbol.java:447) at com.sun.tools.javac.code.Symbol.isMemberOf(Symbol.java:456) Reproduced with the java-versions 1.8.0_102, 1.8.0_101, 1.8.0_91, 1.8.0_66. A (mysterious) role plays the method "public boolean close(long timeout)" in the class B: if it doesn't exist, the error doesn't occur. STEPS TO FOLLOW TO REPRODUCE THE PROBLEM : Compile the attached two classes with javac on the command-line (eg. javac *.java). ERROR MESSAGES/STACK TRACES THAT OCCUR : An exception has occurred in the compiler (1.8.0_91). 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: isSubClass C at com.sun.tools.javac.code.Symbol.isSubClass(Symbol.java:447) at com.sun.tools.javac.code.Symbol.isMemberOf(Symbol.java:456) at com.sun.tools.javac.code.Symbol$MethodSymbol.overrides(Symbol.java:1479) at com.sun.tools.javac.code.Types$ImplementationCache.implementationInternal(Types.java:2693) at com.sun.tools.javac.code.Types$ImplementationCache.get(Types.java:2675) at com.sun.tools.javac.code.Types.implementation(Types.java:2704) at com.sun.tools.javac.code.Symbol$MethodSymbol.implementation(Symbol.java:1539) at com.sun.tools.javac.code.Symbol$MethodSymbol.implementation(Symbol.java:1528) at com.sun.tools.javac.comp.Resolve.notOverriddenIn(Resolve.java:419) at com.sun.tools.javac.comp.Resolve.isAccessible(Resolve.java:405) at com.sun.tools.javac.comp.Resolve.isAccessible(Resolve.java:365) at com.sun.tools.javac.comp.Resolve.selectBest(Resolve.java:1457) at com.sun.tools.javac.comp.Resolve.findMethodInScope(Resolve.java:1627) at com.sun.tools.javac.comp.Resolve.findMethod(Resolve.java:1719) at com.sun.tools.javac.comp.Resolve.findMethod(Resolve.java:1671) at com.sun.tools.javac.comp.Resolve$9.doLookup(Resolve.java:2424) at com.sun.tools.javac.comp.Resolve$BasicLookupHelper.lookup(Resolve.java:3083) at com.sun.tools.javac.comp.Resolve.lookupMethod(Resolve.java:3334) at com.sun.tools.javac.comp.Resolve.resolveQualifiedMethod(Resolve.java:2421) at com.sun.tools.javac.comp.Resolve.resolveQualifiedMethod(Resolve.java:2415) at com.sun.tools.javac.comp.Resolve.resolveQualifiedMethod(Resolve.java:2410) at com.sun.tools.javac.comp.Attr.checkAutoCloseable(Attr.java:1389) at com.sun.tools.javac.comp.Attr.visitTry(Attr.java:1335) at com.sun.tools.javac.tree.JCTree$JCTry.accept(JCTree.java:1173) at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:566) at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:635) at com.sun.tools.javac.comp.Attr.attribStats(Attr.java:651) at com.sun.tools.javac.comp.Attr.visitBlock(Attr.java:1114) at com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java:909) at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:566) at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:635) at com.sun.tools.javac.comp.Attr.visitMethodDef(Attr.java:1003) at com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:778) at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:566) at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:635) at com.sun.tools.javac.comp.Attr.attribClassBody(Attr.java:4340) at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:4248) at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:4177) at com.sun.tools.javac.comp.Attr.attrib(Attr.java:4152) at com.sun.tools.javac.main.JavaCompiler.attribute(JavaCompiler.java:1248) at com.sun.tools.javac.main.JavaCompiler.compile2(JavaCompiler.java:901) at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:860) at com.sun.tools.javac.main.Main.compile(Main.java:523) at com.sun.tools.javac.main.Main.compile(Main.java:381) at com.sun.tools.javac.main.Main.compile(Main.java:370) at com.sun.tools.javac.main.Main.compile(Main.java:361) at com.sun.tools.javac.Main.compile(Main.java:56) at com.sun.tools.javac.Main.main(Main.java:42) REPRODUCIBILITY : This bug can be reproduced always. ---------- BEGIN SOURCE ---------- abstract class B implements AutoCloseable { @Override public void close() { } public boolean close(long timeout) { return true; } } public abstract class A<C extends B> { abstract C newCloseable(); void m() throws Exception{ try(C p= newCloseable()){ } } } ---------- END SOURCE ----------

    JDK Bug System | 4 months ago | Webbug Group
    java.lang.AssertionError: isSubClass C
  3. 0

    FULL PRODUCT VERSION : A DESCRIPTION OF THE PROBLEM : Compiling the two attached trivial classes leads to the following compiler-failure: An exception has occurred in the compiler (1.8.0_91). 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: isSubClass C at com.sun.tools.javac.code.Symbol.isSubClass(Symbol.java:447) at com.sun.tools.javac.code.Symbol.isMemberOf(Symbol.java:456) Reproduced with the java-versions 1.8.0_102, 1.8.0_101, 1.8.0_91, 1.8.0_66. A (mysterious) role plays the method "public boolean close(long timeout)" in the class B: if it doesn't exist, the error doesn't occur. STEPS TO FOLLOW TO REPRODUCE THE PROBLEM : Compile the attached two classes with javac on the command-line (eg. javac *.java). ERROR MESSAGES/STACK TRACES THAT OCCUR : An exception has occurred in the compiler (1.8.0_91). 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: isSubClass C at com.sun.tools.javac.code.Symbol.isSubClass(Symbol.java:447) at com.sun.tools.javac.code.Symbol.isMemberOf(Symbol.java:456) at com.sun.tools.javac.code.Symbol$MethodSymbol.overrides(Symbol.java:1479) at com.sun.tools.javac.code.Types$ImplementationCache.implementationInternal(Types.java:2693) at com.sun.tools.javac.code.Types$ImplementationCache.get(Types.java:2675) at com.sun.tools.javac.code.Types.implementation(Types.java:2704) at com.sun.tools.javac.code.Symbol$MethodSymbol.implementation(Symbol.java:1539) at com.sun.tools.javac.code.Symbol$MethodSymbol.implementation(Symbol.java:1528) at com.sun.tools.javac.comp.Resolve.notOverriddenIn(Resolve.java:419) at com.sun.tools.javac.comp.Resolve.isAccessible(Resolve.java:405) at com.sun.tools.javac.comp.Resolve.isAccessible(Resolve.java:365) at com.sun.tools.javac.comp.Resolve.selectBest(Resolve.java:1457) at com.sun.tools.javac.comp.Resolve.findMethodInScope(Resolve.java:1627) at com.sun.tools.javac.comp.Resolve.findMethod(Resolve.java:1719) at com.sun.tools.javac.comp.Resolve.findMethod(Resolve.java:1671) at com.sun.tools.javac.comp.Resolve$9.doLookup(Resolve.java:2424) at com.sun.tools.javac.comp.Resolve$BasicLookupHelper.lookup(Resolve.java:3083) at com.sun.tools.javac.comp.Resolve.lookupMethod(Resolve.java:3334) at com.sun.tools.javac.comp.Resolve.resolveQualifiedMethod(Resolve.java:2421) at com.sun.tools.javac.comp.Resolve.resolveQualifiedMethod(Resolve.java:2415) at com.sun.tools.javac.comp.Resolve.resolveQualifiedMethod(Resolve.java:2410) at com.sun.tools.javac.comp.Attr.checkAutoCloseable(Attr.java:1389) at com.sun.tools.javac.comp.Attr.visitTry(Attr.java:1335) at com.sun.tools.javac.tree.JCTree$JCTry.accept(JCTree.java:1173) at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:566) at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:635) at com.sun.tools.javac.comp.Attr.attribStats(Attr.java:651) at com.sun.tools.javac.comp.Attr.visitBlock(Attr.java:1114) at com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java:909) at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:566) at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:635) at com.sun.tools.javac.comp.Attr.visitMethodDef(Attr.java:1003) at com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:778) at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:566) at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:635) at com.sun.tools.javac.comp.Attr.attribClassBody(Attr.java:4340) at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:4248) at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:4177) at com.sun.tools.javac.comp.Attr.attrib(Attr.java:4152) at com.sun.tools.javac.main.JavaCompiler.attribute(JavaCompiler.java:1248) at com.sun.tools.javac.main.JavaCompiler.compile2(JavaCompiler.java:901) at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:860) at com.sun.tools.javac.main.Main.compile(Main.java:523) at com.sun.tools.javac.main.Main.compile(Main.java:381) at com.sun.tools.javac.main.Main.compile(Main.java:370) at com.sun.tools.javac.main.Main.compile(Main.java:361) at com.sun.tools.javac.Main.compile(Main.java:56) at com.sun.tools.javac.Main.main(Main.java:42) REPRODUCIBILITY : This bug can be reproduced always. ---------- BEGIN SOURCE ---------- abstract class B implements AutoCloseable { @Override public void close() { } public boolean close(long timeout) { return true; } } public abstract class A<C extends B> { abstract C newCloseable(); void m() throws Exception{ try(C p= newCloseable()){ } } } ---------- END SOURCE ----------

    JDK Bug System | 4 months ago | Webbug Group
    java.lang.AssertionError: isSubClass C
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    GitHub comment 2166#174184644

    GitHub | 11 months ago | karlicoss
    java.lang.AssertionError: expected:<[onPostExecute c, onPostExecute c, onPostExecute c, onPostExecute c]> but was:<[]>
  6. 0

    Try to compile this code: {code} object Program { trait A { type T } type B = A { type T = String } trait C extends B } {code} Compilation fails: {code} Exception in thread "main" java.lang.AssertionError: assertion failed: trait C at scala.Predef$$.assert(Predef.scala:96) at scala.tools.nsc.transform.AddInterfaces.transformMixinInfo(AddInterfaces.scala:196) at scala.tools.nsc.transform.Erasure.transformInfo(Erasure.scala:167) at scala.tools.nsc.transform.InfoTransform$$Phase$$$$anon$$0.transform(InfoTransform.scala:31) at scala.tools.nsc.symtab.Symbols$$Symbol.rawInfo(Symbols.scala:526) at scala.tools.nsc.symtab.Symbols$$Symbol.info(Symbols.scala:473) at scala.tools.nsc.transform.AddInterfaces$$$$anon$$0.transform(AddInterfaces.scala:318) at scala.tools.nsc.ast.Trees$$Transformer.transformTemplate(Trees.scala:1333) at scala.tools.nsc.ast.Trees$$Transformer$$$$anonfun$$21.apply(Trees.scala:1231) at scala.tools.nsc.ast.Trees$$Transformer$$$$anonfun$$21.apply(Trees.scala:1231) at scala.tools.nsc.ast.Trees$$Transformer.atOwner(Trees.scala:1355) at scala.tools.nsc.ast.Trees$$Transformer.transform(Trees.scala:1230) at scala.tools.nsc.transform.AddInterfaces$$$$anon$$0.transform(AddInterfaces.scala:346) at scala.tools.nsc.ast.Trees$$Transformer$$$$anonfun$$33.apply(Trees.scala:1349) at scala.tools.nsc.ast.Trees$$Transformer$$$$anonfun$$33.apply(Trees.scala:1347) at scala.List$$.loop$$0(List.scala:244) at scala.List$$.mapConserve(List.scala:261) at scala.List$$.loop$$0(List.scala:248) at scala.List$$.mapConserve(List.scala:261) at scala.tools.nsc.ast.Trees$$Transformer.transformStats(Trees.scala:1347) at scala.tools.nsc.transform.AddInterfaces$$$$anon$$0.transformStats(AddInterfaces.scala:305) at scala.tools.nsc.ast.Trees$$Transformer.transform(Trees.scala:1259) at scala.tools.nsc.transform.AddInterfaces$$$$anon$$0.transform(AddInterfaces.scala:346) at scala.tools.nsc.ast.Trees$$Transformer.transformTemplate(Trees.scala:1333) at scala.tools.nsc.ast.Trees$$Transformer$$$$anonfun$$21.apply(Trees.scala:1231) at scala.tools.nsc.ast.Trees$$Transformer$$$$anonfun$$21.apply(Trees.scala:1231) at scala.tools.nsc.ast.Trees$$Transformer.atOwner(Trees.scala:1355) at scala.tools.nsc.ast.Trees$$Transformer.transform(Trees.scala:1230) at scala.tools.nsc.transform.AddInterfaces$$$$anon$$0.transform(AddInterfaces.scala:346) at scala.tools.nsc.ast.Trees$$Transformer$$$$anonfun$$33.apply(Trees.scala:1349) at scala.tools.nsc.ast.Trees$$Transformer$$$$anonfun$$33.apply(Trees.scala:1347) at scala.List$$.loop$$0(List.scala:244) at scala.List$$.mapConserve(List.scala:261) at scala.tools.nsc.ast.Trees$$Transformer.transformStats(Trees.scala:1347) at scala.tools.nsc.transform.AddInterfaces$$$$anon$$0.transformStats(AddInterfaces.scala:305) at scala.tools.nsc.ast.Trees$$Transformer$$$$anonfun$$20.apply(Trees.scala:1227) at scala.tools.nsc.ast.Trees$$Transformer$$$$anonfun$$20.apply(Trees.scala:1227) at scala.tools.nsc.ast.Trees$$Transformer.atOwner(Trees.scala:1355) at scala.tools.nsc.ast.Trees$$Transformer.transform(Trees.scala:1226) at scala.tools.nsc.transform.AddInterfaces$$$$anon$$0.transform(AddInterfaces.scala:346) at scala.tools.nsc.transform.Erasure$$ErasureTransformer$$$$anonfun$$26.apply(Erasure.scala:887) at scala.tools.nsc.transform.Erasure$$ErasureTransformer$$$$anonfun$$26.apply(Erasure.scala:886) at scala.tools.nsc.symtab.SymbolTable.atPhase(SymbolTable.scala:85) at scala.tools.nsc.transform.Erasure$$ErasureTransformer.transform(Erasure.scala:886) at scala.tools.nsc.ast.Trees$$Transformer.transformUnit(Trees.scala:1350) at scala.tools.nsc.transform.Transform$$Phase.apply(Transform.scala:30) at scala.tools.nsc.Global$$GlobalPhase.applyPhase(Global.scala:249) at scala.tools.nsc.Global$$GlobalPhase$$$$anonfun$$2.apply(Global.scala:238) at scala.tools.nsc.Global$$GlobalPhase$$$$anonfun$$2.apply(Global.scala:238) at scala.Iterator$$class.foreach(Iterator.scala:375) at scala.collection.mutable.ListBuffer$$$$anon$$0.foreach(ListBuffer.scala:255) at scala.tools.nsc.Global$$GlobalPhase.run(Global.scala:238) at scala.tools.nsc.Global$$Run.compileSources(Global.scala:534) at scala.tools.nsc.Global$$Run.compile(Global.scala:615) at scala.tools.nsc.Main$$.process(Main.scala:86) at scala.tools.nsc.Main$$.main(Main.scala:107) at scala.tools.nsc.Main.main(Main.scala) {code}

    Scala JIRA | 9 years ago | Vladimir Reshetnikov
    java.lang.AssertionError: assertion failed: trait C

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.AssertionError

      C<C>: [TYPE_REFERENCE] - []

      at org.jetbrains.kotlin.resolve.DescriptorResolver.checkBounds()
    2. org.jetbrains.kotlin
      KotlinPsiChecker.annotate
      1. org.jetbrains.kotlin.resolve.DescriptorResolver.checkBounds(DescriptorResolver.java:1041)
      2. org.jetbrains.kotlin.resolve.DescriptorResolver.checkBounds(DescriptorResolver.java:1050)
      3. org.jetbrains.kotlin.resolve.DeclarationsChecker.checkTypesInClassHeader(DeclarationsChecker.kt:168)
      4. org.jetbrains.kotlin.resolve.DeclarationsChecker.process(DeclarationsChecker.kt:100)
      5. org.jetbrains.kotlin.resolve.BodyResolver.resolveBodies(BodyResolver.java:231)
      6. org.jetbrains.kotlin.resolve.LazyTopDownAnalyzer.analyzeDeclarations(LazyTopDownAnalyzer.kt:192)
      7. org.jetbrains.kotlin.resolve.LazyTopDownAnalyzerForTopLevel.analyzeDeclarations(LazyTopDownAnalyzerForTopLevel.java:74)
      8. org.jetbrains.kotlin.idea.caches.resolve.KotlinResolveDataProvider.analyze(KotlinResolveCache.kt:174)
      9. org.jetbrains.kotlin.idea.caches.resolve.PerFileAnalysisCache.analyze(KotlinResolveCache.kt:93)
      10. org.jetbrains.kotlin.idea.caches.resolve.PerFileAnalysisCache.getAnalysisResults(KotlinResolveCache.kt:78)
      11. org.jetbrains.kotlin.idea.caches.resolve.ProjectResolutionFacade.getAnalysisResultsForElements(ProjectResolutionFacade.kt:76)
      12. org.jetbrains.kotlin.idea.caches.resolve.ResolutionFacadeImpl.analyzeFullyAndGetResult(ProjectResolutionFacade.kt:108)
      13. org.jetbrains.kotlin.idea.caches.resolve.ResolutionUtils.analyzeFullyAndGetResult(resolutionApi.kt:77)
      14. org.jetbrains.kotlin.idea.highlighter.KotlinPsiChecker.annotate(KotlinPsiChecker.kt:62)
      14 frames
    3. IDEA
      JobLauncherImpl$VoidForkJoinTask$1.exec
      1. com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.runAnnotators(DefaultHighlightVisitor.java:162)
      2. com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.visit(DefaultHighlightVisitor.java:103)
      3. com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.runVisitors(GeneralHighlightingPass.java:354)
      4. com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.access$100(GeneralHighlightingPass.java:65)
      5. com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass$3.run(GeneralHighlightingPass.java:283)
      6. com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:308)
      7. com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.access$200(GeneralHighlightingPass.java:65)
      8. com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass$4.run(GeneralHighlightingPass.java:314)
      9. com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.analyze(DefaultHighlightVisitor.java:87)
      10. com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:311)
      11. com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectHighlights(GeneralHighlightingPass.java:280)
      12. com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectInformationWithProgress(GeneralHighlightingPass.java:219)
      13. com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:82)
      14. com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:67)
      15. com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1$1.run(PassExecutorService.java:444)
      16. com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1177)
      17. com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1.run(PassExecutorService.java:435)
      18. com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:446)
      19. com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:392)
      20. com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
      21. com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:432)
      22. com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:408)
      23. com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:206)
      23 frames
    4. Quasar
      ForkJoinWorkerThread.run
      1. jsr166e.ForkJoinTask.doExec(ForkJoinTask.java:260)
      2. jsr166e.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:858)
      3. jsr166e.ForkJoinPool.scan(ForkJoinPool.java:1687)
      4. jsr166e.ForkJoinPool.runWorker(ForkJoinPool.java:1642)
      5. jsr166e.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:108)
      5 frames