diff --git a/framework/src/main/java/org/checkerframework/common/basetype/BaseTypeVisitor.java b/framework/src/main/java/org/checkerframework/common/basetype/BaseTypeVisitor.java index 38e697d4290..0987bbe2e59 100644 --- a/framework/src/main/java/org/checkerframework/common/basetype/BaseTypeVisitor.java +++ b/framework/src/main/java/org/checkerframework/common/basetype/BaseTypeVisitor.java @@ -799,7 +799,7 @@ protected List defaultAction( } for (AnnotationMirror poly : polys) { - if (type.hasAnnotationRelaxed(poly)) { + if (type.hasAnnotation(poly)) { return Collections.singletonList( DiagMessage.error("invalid.polymorphic.qualifier.use", poly)); }