Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AsSuperVisitor: type is not an erased subtype of supertype #6825

Closed
theosotr opened this issue Sep 27, 2024 · 0 comments · Fixed by #6826
Closed

AsSuperVisitor: type is not an erased subtype of supertype #6825

theosotr opened this issue Sep 27, 2024 · 0 comments · Fixed by #6826
Assignees
Labels

Comments

@theosotr
Copy link

Command

javac \
  -J--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \
  -J--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED \
  -J--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED \
  -J--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED \
  -J--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED \
  -J--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED \
  -J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED \
  -J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED \
  -J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED \
-processor org.checkerframework.checker.nullness.NullnessChecker \
-cp ~/Downloads/checker-framework-3.47.0/checker/dist/checker.jar Main.java

File

class A<T extends Number> {}

class B {
    A<? super Number> f;
    B(A<Number> f) {
        this.f = f;
    }
}

class Main {
    static void main(String[] args) {
        B x = new B(new A<>());
        var y = ((false) ? x.f : new A<Number>());
    }
}

Actual behavior

error: AsSuperVisitor: type is not an erased subtype of supertype.
  type: Object
  superType: Number</*Type args not initialized*/>
  ; The Checker Framework crashed.  Please report the crash.  Version: Checker Framework 3.47.0. 
  Compilation unit: Main.java
  Last visited tree at line 13 column 18:
          var y = ((false) ? x.f : new A<Number>());
  Exception: org.checkerframework.javacutil.BugInCF: AsSuperVisitor: type is not an erased subtype of supertype.
  type: Object
  superType: Number</*Type args not initialized*/>; org.checkerframework.javacutil.BugInCF: AsSuperVisitor: type is not an erased subtype of supertype.
  type: Object
  superType: Number</*Type args not initialized*/>
  	at org.checkerframework.framework.type.AsSuperVisitor.errorTypeNotErasedSubtypeOfSuperType(AsSuperVisitor.java:148)
  	at org.checkerframework.framework.type.AsSuperVisitor.visitDeclared_Declared(AsSuperVisitor.java:338)
  	at org.checkerframework.framework.type.AsSuperVisitor.visitDeclared_Declared(AsSuperVisitor.java:30)
  	at org.checkerframework.framework.util.AtmCombo.accept(AtmCombo.java:313)
  	at org.checkerframework.framework.type.visitor.AbstractAtmComboVisitor.visit(AbstractAtmComboVisitor.java:34)
  	at org.checkerframework.framework.type.AsSuperVisitor.visit(AsSuperVisitor.java:107)
  	at org.checkerframework.framework.type.AsSuperVisitor.visitWildcard_NotTypevarNorWildcard(AsSuperVisitor.java:734)
  	at org.checkerframework.framework.type.AsSuperVisitor.visitWildcard_Declared(AsSuperVisitor.java:750)
  	at org.checkerframework.framework.type.AsSuperVisitor.visitWildcard_Declared(AsSuperVisitor.java:30)
  	at org.checkerframework.framework.util.AtmCombo.accept(AtmCombo.java:629)
  	at org.checkerframework.framework.type.visitor.AbstractAtmComboVisitor.visit(AbstractAtmComboVisitor.java:34)
  	at org.checkerframework.framework.type.AsSuperVisitor.visit(AsSuperVisitor.java:107)
  	at org.checkerframework.framework.type.AsSuperVisitor.asSuper(AsSuperVisitor.java:88)
  	at org.checkerframework.framework.util.AnnotatedTypes.asSuper(AnnotatedTypes.java:118)
  	at org.checkerframework.framework.util.AtmLubVisitor.lubTypeArgument(AtmLubVisitor.java:218)
  	at org.checkerframework.framework.util.AtmLubVisitor.visitDeclared_Declared(AtmLubVisitor.java:208)
  	at org.checkerframework.framework.util.AtmLubVisitor.visitDeclared_Declared(AtmLubVisitor.java:33)
  	at org.checkerframework.framework.util.AtmCombo.accept(AtmCombo.java:313)
  	at org.checkerframework.framework.type.visitor.AbstractAtmComboVisitor.visit(AbstractAtmComboVisitor.java:34)
  	at org.checkerframework.framework.util.AtmLubVisitor.lub(AtmLubVisitor.java:72)
  	at org.checkerframework.framework.util.AnnotatedTypes.leastUpperBound(AnnotatedTypes.java:856)
  	at org.checkerframework.framework.type.TypeFromExpressionVisitor.visitConditionalExpression(TypeFromExpressionVisitor.java:182)
  	at org.checkerframework.framework.type.TypeFromExpressionVisitor.visitConditionalExpression(TypeFromExpressionVisitor.java:77)
  	at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCConditional.accept(JCTree.java:1397)
  	at jdk.compiler/com.sun.source.util.SimpleTreeVisitor.visit(SimpleTreeVisitor.java:80)
  	at org.checkerframework.framework.type.TypeFromTree.fromExpression(TypeFromTree.java:41)
  	at org.checkerframework.framework.type.AnnotatedTypeFactory.fromExpression(AnnotatedTypeFactory.java:1712)
  	at org.checkerframework.framework.type.AnnotatedTypeFactory.getAnnotatedType(AnnotatedTypeFactory.java:1378)
  	at org.checkerframework.framework.flow.CFAbstractTransfer.getValueFromFactory(CFAbstractTransfer.java:219)
  	at org.checkerframework.framework.flow.CFAbstractTransfer.visitNode(CFAbstractTransfer.java:635)
  	at org.checkerframework.framework.flow.CFAbstractTransfer.visitNode(CFAbstractTransfer.java:105)
  	at org.checkerframework.dataflow.cfg.node.AbstractNodeVisitor.visitTernaryExpression(AbstractNodeVisitor.java:210)
  	at org.checkerframework.framework.flow.CFAbstractTransfer.visitTernaryExpression(CFAbstractTransfer.java:798)
  	at org.checkerframework.framework.flow.CFAbstractTransfer.visitTernaryExpression(CFAbstractTransfer.java:105)
  	at org.checkerframework.dataflow.cfg.node.TernaryExpressionNode.accept(TernaryExpressionNode.java:107)
  	at org.checkerframework.dataflow.analysis.AbstractAnalysis.callTransferFunction(AbstractAnalysis.java:386)
  	at org.checkerframework.dataflow.analysis.ForwardAnalysisImpl.callTransferFunction(ForwardAnalysisImpl.java:377)
  	at org.checkerframework.framework.flow.CFAbstractAnalysis.callTransferFunction(CFAbstractAnalysis.java:242)
  	at org.checkerframework.dataflow.analysis.ForwardAnalysisImpl.performAnalysisBlock(ForwardAnalysisImpl.java:128)
  	at org.checkerframework.dataflow.analysis.ForwardAnalysisImpl.performAnalysis(ForwardAnalysisImpl.java:105)
  	at org.checkerframework.framework.flow.CFAbstractAnalysis.performAnalysis(CFAbstractAnalysis.java:151)
  	at org.checkerframework.framework.type.GenericAnnotatedTypeFactory.analyze(GenericAnnotatedTypeFactory.java:1584)
  	at org.checkerframework.framework.type.GenericAnnotatedTypeFactory.performFlowAnalysis(GenericAnnotatedTypeFactory.java:1478)
  	at org.checkerframework.framework.type.GenericAnnotatedTypeFactory.checkAndPerformFlowAnalysis(GenericAnnotatedTypeFactory.java:1987)
  	at org.checkerframework.framework.type.GenericAnnotatedTypeFactory.preProcessClassTree(GenericAnnotatedTypeFactory.java:429)
  	at org.checkerframework.common.basetype.BaseTypeVisitor.visitClass(BaseTypeVisitor.java:548)
  	at org.checkerframework.common.basetype.BaseTypeVisitor.visitClass(BaseTypeVisitor.java:189)
  	at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:808)
  	at jdk.compiler/com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:56)
  	at org.checkerframework.framework.source.SourceVisitor.visit(SourceVisitor.java:86)
  	at org.checkerframework.framework.source.SourceChecker.typeProcess(SourceChecker.java:1091)
  	at org.checkerframework.common.basetype.BaseTypeChecker.typeProcess(BaseTypeChecker.java:559)
  	at org.checkerframework.common.basetype.BaseTypeChecker.typeProcess(BaseTypeChecker.java:552)
  	at org.checkerframework.javacutil.AbstractTypeProcessor$AttributionTaskListener.finished(AbstractTypeProcessor.java:188)
  	at jdk.compiler/com.sun.tools.javac.api.ClientCodeWrapper$WrappedTaskListener.finished(ClientCodeWrapper.java:828)
  	at jdk.compiler/com.sun.tools.javac.api.MultiTaskListener.finished(MultiTaskListener.java:132)
  	at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1418)
  	at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1375)
  	at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:973)
  	at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:311)
  	at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:170)
  	at jdk.compiler/com.sun.tools.javac.Main.compile(Main.java:57)
  	at jdk.compiler/com.sun.tools.javac.Main.main(Main.java:43)
  Caused by: java.lang.Throwable
  	at org.checkerframework.javacutil.BugInCF.<init>(BugInCF.java:38)
  	... 63 more
  
  Underlying Exception: java.lang.Throwable; java.lang.Throwable
  	at org.checkerframework.javacutil.BugInCF.<init>(BugInCF.java:38)
  	at org.checkerframework.framework.type.AsSuperVisitor.errorTypeNotErasedSubtypeOfSuperType(AsSuperVisitor.java:148)
  	at org.checkerframework.framework.type.AsSuperVisitor.visitDeclared_Declared(AsSuperVisitor.java:338)
  	at org.checkerframework.framework.type.AsSuperVisitor.visitDeclared_Declared(AsSuperVisitor.java:30)
  	at org.checkerframework.framework.util.AtmCombo.accept(AtmCombo.java:313)
  	at org.checkerframework.framework.type.visitor.AbstractAtmComboVisitor.visit(AbstractAtmComboVisitor.java:34)
  	at org.checkerframework.framework.type.AsSuperVisitor.visit(AsSuperVisitor.java:107)
  	at org.checkerframework.framework.type.AsSuperVisitor.visitWildcard_NotTypevarNorWildcard(AsSuperVisitor.java:734)
  	at org.checkerframework.framework.type.AsSuperVisitor.visitWildcard_Declared(AsSuperVisitor.java:750)
  	at org.checkerframework.framework.type.AsSuperVisitor.visitWildcard_Declared(AsSuperVisitor.java:30)
  	at org.checkerframework.framework.util.AtmCombo.accept(AtmCombo.java:629)
  	at org.checkerframework.framework.type.visitor.AbstractAtmComboVisitor.visit(AbstractAtmComboVisitor.java:34)
  	at org.checkerframework.framework.type.AsSuperVisitor.visit(AsSuperVisitor.java:107)
  	at org.checkerframework.framework.type.AsSuperVisitor.asSuper(AsSuperVisitor.java:88)
  	at org.checkerframework.framework.util.AnnotatedTypes.asSuper(AnnotatedTypes.java:118)
  	at org.checkerframework.framework.util.AtmLubVisitor.lubTypeArgument(AtmLubVisitor.java:218)
  	at org.checkerframework.framework.util.AtmLubVisitor.visitDeclared_Declared(AtmLubVisitor.java:208)
  	at org.checkerframework.framework.util.AtmLubVisitor.visitDeclared_Declared(AtmLubVisitor.java:33)
  	at org.checkerframework.framework.util.AtmCombo.accept(AtmCombo.java:313)
  	at org.checkerframework.framework.type.visitor.AbstractAtmComboVisitor.visit(AbstractAtmComboVisitor.java:34)
  	at org.checkerframework.framework.util.AtmLubVisitor.lub(AtmLubVisitor.java:72)
  	at org.checkerframework.framework.util.AnnotatedTypes.leastUpperBound(AnnotatedTypes.java:856)
  	at org.checkerframework.framework.type.TypeFromExpressionVisitor.visitConditionalExpression(TypeFromExpressionVisitor.java:182)
  	at org.checkerframework.framework.type.TypeFromExpressionVisitor.visitConditionalExpression(TypeFromExpressionVisitor.java:77)
  	at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCConditional.accept(JCTree.java:1397)
  	at jdk.compiler/com.sun.source.util.SimpleTreeVisitor.visit(SimpleTreeVisitor.java:80)
  	at org.checkerframework.framework.type.TypeFromTree.fromExpression(TypeFromTree.java:41)
  	at org.checkerframework.framework.type.AnnotatedTypeFactory.fromExpression(AnnotatedTypeFactory.java:1712)
  	at org.checkerframework.framework.type.AnnotatedTypeFactory.getAnnotatedType(AnnotatedTypeFactory.java:1378)
  	at org.checkerframework.framework.flow.CFAbstractTransfer.getValueFromFactory(CFAbstractTransfer.java:219)
  	at org.checkerframework.framework.flow.CFAbstractTransfer.visitNode(CFAbstractTransfer.java:635)
  	at org.checkerframework.framework.flow.CFAbstractTransfer.visitNode(CFAbstractTransfer.java:105)
  	at org.checkerframework.dataflow.cfg.node.AbstractNodeVisitor.visitTernaryExpression(AbstractNodeVisitor.java:210)
  	at org.checkerframework.framework.flow.CFAbstractTransfer.visitTernaryExpression(CFAbstractTransfer.java:798)
  	at org.checkerframework.framework.flow.CFAbstractTransfer.visitTernaryExpression(CFAbstractTransfer.java:105)
  	at org.checkerframework.dataflow.cfg.node.TernaryExpressionNode.accept(TernaryExpressionNode.java:107)
  	at org.checkerframework.dataflow.analysis.AbstractAnalysis.callTransferFunction(AbstractAnalysis.java:386)
  	at org.checkerframework.dataflow.analysis.ForwardAnalysisImpl.callTransferFunction(ForwardAnalysisImpl.java:377)
  	at org.checkerframework.framework.flow.CFAbstractAnalysis.callTransferFunction(CFAbstractAnalysis.java:242)
  	at org.checkerframework.dataflow.analysis.ForwardAnalysisImpl.performAnalysisBlock(ForwardAnalysisImpl.java:128)
  	at org.checkerframework.dataflow.analysis.ForwardAnalysisImpl.performAnalysis(ForwardAnalysisImpl.java:105)
  	at org.checkerframework.framework.flow.CFAbstractAnalysis.performAnalysis(CFAbstractAnalysis.java:151)
  	at org.checkerframework.framework.type.GenericAnnotatedTypeFactory.analyze(GenericAnnotatedTypeFactory.java:1584)
  	at org.checkerframework.framework.type.GenericAnnotatedTypeFactory.performFlowAnalysis(GenericAnnotatedTypeFactory.java:1478)
  	at org.checkerframework.framework.type.GenericAnnotatedTypeFactory.checkAndPerformFlowAnalysis(GenericAnnotatedTypeFactory.java:1987)
  	at org.checkerframework.framework.type.GenericAnnotatedTypeFactory.preProcessClassTree(GenericAnnotatedTypeFactory.java:429)
  	at org.checkerframework.common.basetype.BaseTypeVisitor.visitClass(BaseTypeVisitor.java:548)
  	at org.checkerframework.common.basetype.BaseTypeVisitor.visitClass(BaseTypeVisitor.java:189)
  	at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:808)
  	at jdk.compiler/com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:56)
  	at org.checkerframework.framework.source.SourceVisitor.visit(SourceVisitor.java:86)
  	at org.checkerframework.framework.source.SourceChecker.typeProcess(SourceChecker.java:1091)
  	at org.checkerframework.common.basetype.BaseTypeChecker.typeProcess(BaseTypeChecker.java:559)
  	at org.checkerframework.common.basetype.BaseTypeChecker.typeProcess(BaseTypeChecker.java:552)
  	at org.checkerframework.javacutil.AbstractTypeProcessor$AttributionTaskListener.finished(AbstractTypeProcessor.java:188)
  	at jdk.compiler/com.sun.tools.javac.api.ClientCodeWrapper$WrappedTaskListener.finished(ClientCodeWrapper.java:828)
  	at jdk.compiler/com.sun.tools.javac.api.MultiTaskListener.finished(MultiTaskListener.java:132)
  	at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1418)
  	at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1375)
  	at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:973)
  	at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:311)
  	at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:170)
  	at jdk.compiler/com.sun.tools.javac.Main.compile(Main.java:57)
  	at jdk.compiler/com.sun.tools.javac.Main.main(Main.java:43)
error: AsSuperVisitor: type is not an erased subtype of supertype.
  type: @Initialized @NonNull Object
  superType: Number</*Type args not initialized*/>
  ; The Checker Framework crashed.  Please report the crash.  Version: Checker Framework 3.47.0. 
  Compilation unit: Main.java
  Last visited tree at line 13 column 18:
          var y = ((false) ? x.f : new A<Number>());
  Exception: org.checkerframework.javacutil.BugInCF: AsSuperVisitor: type is not an erased subtype of supertype.
  type: @Initialized @NonNull Object
  superType: Number</*Type args not initialized*/>; org.checkerframework.javacutil.BugInCF: AsSuperVisitor: type is not an erased subtype of supertype.
  type: @Initialized @NonNull Object
  superType: Number</*Type args not initialized*/>
  	at org.checkerframework.framework.type.AsSuperVisitor.errorTypeNotErasedSubtypeOfSuperType(AsSuperVisitor.java:148)
  	at org.checkerframework.framework.type.AsSuperVisitor.visitDeclared_Declared(AsSuperVisitor.java:338)
  	at org.checkerframework.framework.type.AsSuperVisitor.visitDeclared_Declared(AsSuperVisitor.java:30)
  	at org.checkerframework.framework.util.AtmCombo.accept(AtmCombo.java:313)
  	at org.checkerframework.framework.type.visitor.AbstractAtmComboVisitor.visit(AbstractAtmComboVisitor.java:34)
  	at org.checkerframework.framework.type.AsSuperVisitor.visit(AsSuperVisitor.java:107)
  	at org.checkerframework.framework.type.AsSuperVisitor.visitWildcard_NotTypevarNorWildcard(AsSuperVisitor.java:734)
  	at org.checkerframework.framework.type.AsSuperVisitor.visitWildcard_Declared(AsSuperVisitor.java:750)
  	at org.checkerframework.framework.type.AsSuperVisitor.visitWildcard_Declared(AsSuperVisitor.java:30)
  	at org.checkerframework.framework.util.AtmCombo.accept(AtmCombo.java:629)
  	at org.checkerframework.framework.type.visitor.AbstractAtmComboVisitor.visit(AbstractAtmComboVisitor.java:34)
  	at org.checkerframework.framework.type.AsSuperVisitor.visit(AsSuperVisitor.java:107)
  	at org.checkerframework.framework.type.AsSuperVisitor.asSuper(AsSuperVisitor.java:88)
  	at org.checkerframework.framework.util.AnnotatedTypes.asSuper(AnnotatedTypes.java:118)
  	at org.checkerframework.framework.util.AtmLubVisitor.lubTypeArgument(AtmLubVisitor.java:218)
  	at org.checkerframework.framework.util.AtmLubVisitor.visitDeclared_Declared(AtmLubVisitor.java:208)
  	at org.checkerframework.framework.util.AtmLubVisitor.visitDeclared_Declared(AtmLubVisitor.java:33)
  	at org.checkerframework.framework.util.AtmCombo.accept(AtmCombo.java:313)
  	at org.checkerframework.framework.type.visitor.AbstractAtmComboVisitor.visit(AbstractAtmComboVisitor.java:34)
  	at org.checkerframework.framework.util.AtmLubVisitor.lub(AtmLubVisitor.java:72)
  	at org.checkerframework.framework.util.AnnotatedTypes.leastUpperBound(AnnotatedTypes.java:856)
  	at org.checkerframework.framework.type.TypeFromExpressionVisitor.visitConditionalExpression(TypeFromExpressionVisitor.java:182)
  	at org.checkerframework.framework.type.TypeFromExpressionVisitor.visitConditionalExpression(TypeFromExpressionVisitor.java:77)
  	at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCConditional.accept(JCTree.java:1397)
  	at jdk.compiler/com.sun.source.util.SimpleTreeVisitor.visit(SimpleTreeVisitor.java:80)
  	at org.checkerframework.framework.type.TypeFromTree.fromExpression(TypeFromTree.java:41)
  	at org.checkerframework.framework.type.AnnotatedTypeFactory.fromExpression(AnnotatedTypeFactory.java:1712)
  	at org.checkerframework.framework.type.AnnotatedTypeFactory.getAnnotatedType(AnnotatedTypeFactory.java:1378)
  	at org.checkerframework.framework.flow.CFAbstractTransfer.getValueFromFactory(CFAbstractTransfer.java:219)
  	at org.checkerframework.framework.flow.CFAbstractTransfer.visitNode(CFAbstractTransfer.java:635)
  	at org.checkerframework.framework.flow.CFAbstractTransfer.visitNode(CFAbstractTransfer.java:105)
  	at org.checkerframework.dataflow.cfg.node.AbstractNodeVisitor.visitTernaryExpression(AbstractNodeVisitor.java:210)
  	at org.checkerframework.framework.flow.CFAbstractTransfer.visitTernaryExpression(CFAbstractTransfer.java:798)
  	at org.checkerframework.framework.flow.CFAbstractTransfer.visitTernaryExpression(CFAbstractTransfer.java:105)
  	at org.checkerframework.dataflow.cfg.node.TernaryExpressionNode.accept(TernaryExpressionNode.java:107)
  	at org.checkerframework.dataflow.analysis.AbstractAnalysis.callTransferFunction(AbstractAnalysis.java:386)
  	at org.checkerframework.dataflow.analysis.ForwardAnalysisImpl.callTransferFunction(ForwardAnalysisImpl.java:377)
  	at org.checkerframework.framework.flow.CFAbstractAnalysis.callTransferFunction(CFAbstractAnalysis.java:242)
  	at org.checkerframework.dataflow.analysis.ForwardAnalysisImpl.performAnalysisBlock(ForwardAnalysisImpl.java:128)
  	at org.checkerframework.dataflow.analysis.ForwardAnalysisImpl.performAnalysis(ForwardAnalysisImpl.java:105)
  	at org.checkerframework.framework.flow.CFAbstractAnalysis.performAnalysis(CFAbstractAnalysis.java:151)
  	at org.checkerframework.framework.type.GenericAnnotatedTypeFactory.analyze(GenericAnnotatedTypeFactory.java:1584)
  	at org.checkerframework.framework.type.GenericAnnotatedTypeFactory.performFlowAnalysis(GenericAnnotatedTypeFactory.java:1478)
  	at org.checkerframework.framework.type.GenericAnnotatedTypeFactory.checkAndPerformFlowAnalysis(GenericAnnotatedTypeFactory.java:1987)
  	at org.checkerframework.framework.type.GenericAnnotatedTypeFactory.preProcessClassTree(GenericAnnotatedTypeFactory.java:429)
  	at org.checkerframework.common.basetype.BaseTypeVisitor.visitClass(BaseTypeVisitor.java:548)
  	at org.checkerframework.common.basetype.BaseTypeVisitor.visitClass(BaseTypeVisitor.java:189)
  	at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:808)
  	at jdk.compiler/com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:56)
  	at org.checkerframework.framework.source.SourceVisitor.visit(SourceVisitor.java:86)
  	at org.checkerframework.framework.source.SourceChecker.typeProcess(SourceChecker.java:1091)
  	at org.checkerframework.common.basetype.BaseTypeChecker.typeProcess(BaseTypeChecker.java:559)
  	at org.checkerframework.javacutil.AbstractTypeProcessor$AttributionTaskListener.finished(AbstractTypeProcessor.java:188)
  	at jdk.compiler/com.sun.tools.javac.api.ClientCodeWrapper$WrappedTaskListener.finished(ClientCodeWrapper.java:828)
  	at jdk.compiler/com.sun.tools.javac.api.MultiTaskListener.finished(MultiTaskListener.java:132)
  	at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1418)
  	at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1375)
  	at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:973)
  	at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:311)
  	at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:170)
  	at jdk.compiler/com.sun.tools.javac.Main.compile(Main.java:57)
  	at jdk.compiler/com.sun.tools.javac.Main.main(Main.java:43)
  Caused by: java.lang.Throwable
  	at org.checkerframework.javacutil.BugInCF.<init>(BugInCF.java:38)
  	... 62 more
  
  Underlying Exception: java.lang.Throwable; java.lang.Throwable
  	at org.checkerframework.javacutil.BugInCF.<init>(BugInCF.java:38)
  	at org.checkerframework.framework.type.AsSuperVisitor.errorTypeNotErasedSubtypeOfSuperType(AsSuperVisitor.java:148)
  	at org.checkerframework.framework.type.AsSuperVisitor.visitDeclared_Declared(AsSuperVisitor.java:338)
  	at org.checkerframework.framework.type.AsSuperVisitor.visitDeclared_Declared(AsSuperVisitor.java:30)
  	at org.checkerframework.framework.util.AtmCombo.accept(AtmCombo.java:313)
  	at org.checkerframework.framework.type.visitor.AbstractAtmComboVisitor.visit(AbstractAtmComboVisitor.java:34)
  	at org.checkerframework.framework.type.AsSuperVisitor.visit(AsSuperVisitor.java:107)
  	at org.checkerframework.framework.type.AsSuperVisitor.visitWildcard_NotTypevarNorWildcard(AsSuperVisitor.java:734)
  	at org.checkerframework.framework.type.AsSuperVisitor.visitWildcard_Declared(AsSuperVisitor.java:750)
  	at org.checkerframework.framework.type.AsSuperVisitor.visitWildcard_Declared(AsSuperVisitor.java:30)
  	at org.checkerframework.framework.util.AtmCombo.accept(AtmCombo.java:629)
  	at org.checkerframework.framework.type.visitor.AbstractAtmComboVisitor.visit(AbstractAtmComboVisitor.java:34)
  	at org.checkerframework.framework.type.AsSuperVisitor.visit(AsSuperVisitor.java:107)
  	at org.checkerframework.framework.type.AsSuperVisitor.asSuper(AsSuperVisitor.java:88)
  	at org.checkerframework.framework.util.AnnotatedTypes.asSuper(AnnotatedTypes.java:118)
  	at org.checkerframework.framework.util.AtmLubVisitor.lubTypeArgument(AtmLubVisitor.java:218)
  	at org.checkerframework.framework.util.AtmLubVisitor.visitDeclared_Declared(AtmLubVisitor.java:208)
  	at org.checkerframework.framework.util.AtmLubVisitor.visitDeclared_Declared(AtmLubVisitor.java:33)
  	at org.checkerframework.framework.util.AtmCombo.accept(AtmCombo.java:313)
  	at org.checkerframework.framework.type.visitor.AbstractAtmComboVisitor.visit(AbstractAtmComboVisitor.java:34)
  	at org.checkerframework.framework.util.AtmLubVisitor.lub(AtmLubVisitor.java:72)
  	at org.checkerframework.framework.util.AnnotatedTypes.leastUpperBound(AnnotatedTypes.java:856)
  	at org.checkerframework.framework.type.TypeFromExpressionVisitor.visitConditionalExpression(TypeFromExpressionVisitor.java:182)
  	at org.checkerframework.framework.type.TypeFromExpressionVisitor.visitConditionalExpression(TypeFromExpressionVisitor.java:77)
  	at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCConditional.accept(JCTree.java:1397)
  	at jdk.compiler/com.sun.source.util.SimpleTreeVisitor.visit(SimpleTreeVisitor.java:80)
  	at org.checkerframework.framework.type.TypeFromTree.fromExpression(TypeFromTree.java:41)
  	at org.checkerframework.framework.type.AnnotatedTypeFactory.fromExpression(AnnotatedTypeFactory.java:1712)
  	at org.checkerframework.framework.type.AnnotatedTypeFactory.getAnnotatedType(AnnotatedTypeFactory.java:1378)
  	at org.checkerframework.framework.flow.CFAbstractTransfer.getValueFromFactory(CFAbstractTransfer.java:219)
  	at org.checkerframework.framework.flow.CFAbstractTransfer.visitNode(CFAbstractTransfer.java:635)
  	at org.checkerframework.framework.flow.CFAbstractTransfer.visitNode(CFAbstractTransfer.java:105)
  	at org.checkerframework.dataflow.cfg.node.AbstractNodeVisitor.visitTernaryExpression(AbstractNodeVisitor.java:210)
  	at org.checkerframework.framework.flow.CFAbstractTransfer.visitTernaryExpression(CFAbstractTransfer.java:798)
  	at org.checkerframework.framework.flow.CFAbstractTransfer.visitTernaryExpression(CFAbstractTransfer.java:105)
  	at org.checkerframework.dataflow.cfg.node.TernaryExpressionNode.accept(TernaryExpressionNode.java:107)
  	at org.checkerframework.dataflow.analysis.AbstractAnalysis.callTransferFunction(AbstractAnalysis.java:386)
  	at org.checkerframework.dataflow.analysis.ForwardAnalysisImpl.callTransferFunction(ForwardAnalysisImpl.java:377)
  	at org.checkerframework.framework.flow.CFAbstractAnalysis.callTransferFunction(CFAbstractAnalysis.java:242)
  	at org.checkerframework.dataflow.analysis.ForwardAnalysisImpl.performAnalysisBlock(ForwardAnalysisImpl.java:128)
  	at org.checkerframework.dataflow.analysis.ForwardAnalysisImpl.performAnalysis(ForwardAnalysisImpl.java:105)
  	at org.checkerframework.framework.flow.CFAbstractAnalysis.performAnalysis(CFAbstractAnalysis.java:151)
  	at org.checkerframework.framework.type.GenericAnnotatedTypeFactory.analyze(GenericAnnotatedTypeFactory.java:1584)
  	at org.checkerframework.framework.type.GenericAnnotatedTypeFactory.performFlowAnalysis(GenericAnnotatedTypeFactory.java:1478)
  	at org.checkerframework.framework.type.GenericAnnotatedTypeFactory.checkAndPerformFlowAnalysis(GenericAnnotatedTypeFactory.java:1987)
  	at org.checkerframework.framework.type.GenericAnnotatedTypeFactory.preProcessClassTree(GenericAnnotatedTypeFactory.java:429)
  	at org.checkerframework.common.basetype.BaseTypeVisitor.visitClass(BaseTypeVisitor.java:548)
  	at org.checkerframework.common.basetype.BaseTypeVisitor.visitClass(BaseTypeVisitor.java:189)
  	at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:808)
  	at jdk.compiler/com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:56)
  	at org.checkerframework.framework.source.SourceVisitor.visit(SourceVisitor.java:86)
  	at org.checkerframework.framework.source.SourceChecker.typeProcess(SourceChecker.java:1091)
  	at org.checkerframework.common.basetype.BaseTypeChecker.typeProcess(BaseTypeChecker.java:559)
  	at org.checkerframework.javacutil.AbstractTypeProcessor$AttributionTaskListener.finished(AbstractTypeProcessor.java:188)
  	at jdk.compiler/com.sun.tools.javac.api.ClientCodeWrapper$WrappedTaskListener.finished(ClientCodeWrapper.java:828)
  	at jdk.compiler/com.sun.tools.javac.api.MultiTaskListener.finished(MultiTaskListener.java:132)
  	at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1418)
  	at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1375)
  	at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:973)
  	at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:311)
  	at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:170)
  	at jdk.compiler/com.sun.tools.javac.Main.compile(Main.java:57)
  	at jdk.compiler/com.sun.tools.javac.Main.main(Main.java:43)
2 errors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants