77import org .checkerframework .framework .type .StructuralEqualityComparer ;
88import org .checkerframework .framework .type .StructuralEqualityVisitHistory ;
99import org .checkerframework .framework .type .SubtypeVisitHistory ;
10+ import org .checkerframework .javacutil .AnnotationUtils ;
1011import org .checkerframework .javacutil .BugInCF ;
1112
1213import javax .lang .model .element .AnnotationMirror ;
1314
14- import checkers .inference .model .Slot ;
15-
1615/**
1716 * The InferenceTypeHierarchy along with the InferenceQualifierHierarchy is responsible for
1817 * creating a subtype and equality constraints. Normally the methods of these two classes are queried
@@ -27,7 +26,6 @@ public class InferenceTypeHierarchy extends DefaultTypeHierarchy {
2726 private final AnnotationMirror varAnnot ;
2827 // TODO: Think this through, add any missing constraints
2928
30-
3129 /**
3230 * Constructs an instance of {@code TypeHierarchy} for the type system
3331 * whose qualifiers represented in qualifierHierarchy.
@@ -52,6 +50,12 @@ public StructuralEqualityComparer createEqualityComparer() {
5250 return new InferenceEqualityComparer (this .typeargVisitHistory ,
5351 InferenceQualifierHierarchy .findVarAnnot (qualifierHierarchy .getTopAnnotations ()));
5452 }
53+
54+ @ Override
55+ public boolean isSubtype (
56+ final AnnotatedTypeMirror subtype , final AnnotatedTypeMirror supertype ) {
57+ return isSubtype (subtype , supertype , varAnnot );
58+ }
5559}
5660
5761class InferenceEqualityComparer extends StructuralEqualityComparer {
0 commit comments