I have a few reports to share of crashes that reproduce against Checker Framework 4.0.0. I'll file separate bugs for ones that look distinct, but it's possible that some of them share root causes.
The other issues are: #7677, #7678, #7679, #7680, #7681, #7682, #7683, #7684
edit: Some additional issues: #7693, #7694, #7695, #7696, #7697, #7698, #7699, #7700, #7701, #7702
import java.util.Optional;
public class CrashRepro {
Optional<Foo> repro(int i) {
return Optional.of(
switch (i) {
case 1 -> new Bar();
default -> new Bar();
});
}
static class Foo {}
static class Bar extends Foo {}
}
./checker-framework-4.0.0/checker/bin/javac -processor nullness CrashRepro.java |& head -n 30
error: AsSuperVisitor: type is not an erased subtype of supertype.
type: Foo
superType: Bar
; The Checker Framework crashed. Please report the crash. Version: Checker Framework 4.0.0.
Compilation unit: CrashRepro.java
Last visited tree at line 5 column 12:
return Optional.of(
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:354)
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.asSuper(AsSuperVisitor.java:88)
at org.checkerframework.framework.util.AnnotatedTypes.asSuper(AnnotatedTypes.java:117)
at org.checkerframework.framework.util.AnnotatedTypes.castedAsSuper(AnnotatedTypes.java:153)
at org.checkerframework.framework.type.DefaultTypeHierarchy.visitTypeArgs(DefaultTypeHierarchy.java:584)
at org.checkerframework.framework.type.DefaultTypeHierarchy.visitDeclared_Declared(DefaultTypeHierarchy.java:556)
at org.checkerframework.framework.type.DefaultTypeHierarchy.visitDeclared_Declared(DefaultTypeHierarchy.java:49)
at org.checkerframework.framework.util.AtmCombo.accept(AtmCombo.java:313)
at org.checkerframework.framework.type.DefaultTypeHierarchy.isSubtype(DefaultTypeHierarchy.java:260)
at org.checkerframework.framework.type.DefaultTypeHierarchy.isSubtype(DefaultTypeHierarchy.java:138)
at org.checkerframework.common.basetype.BaseTypeVisitor.commonAssignmentCheck(BaseTypeVisitor.java:3252)
at org.checkerframework.common.basetype.BaseTypeVisitor.commonAssignmentCheck(BaseTypeVisitor.java:3227)
at org.checkerframework.common.basetype.BaseTypeVisitor.checkArguments(BaseTypeVisitor.java:3796)
at org.checkerframework.common.basetype.BaseTypeVisitor.visitMethodInvocation(BaseTypeVisitor.java:1922)
at org.checkerframework.common.basetype.BaseTypeVisitor.visitMethodInvocation(BaseTypeVisitor.java:189)
at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept(JCTree.java:1892)
I have a few reports to share of crashes that reproduce against Checker Framework 4.0.0. I'll file separate bugs for ones that look distinct, but it's possible that some of them share root causes.
The other issues are: #7677, #7678, #7679, #7680, #7681, #7682, #7683, #7684
edit: Some additional issues: #7693, #7694, #7695, #7696, #7697, #7698, #7699, #7700, #7701, #7702