From 74bba756623a6c594478759a41c185550716d9f0 Mon Sep 17 00:00:00 2001 From: Aosen Xiong Date: Sun, 31 Mar 2024 18:58:24 -0400 Subject: [PATCH 1/3] Use hasExplicitAnnotation for precise check --- .../org/checkerframework/common/basetype/BaseTypeVisitor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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..2922a504527 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.hasExplicitAnnotation(poly)) { return Collections.singletonList( DiagMessage.error("invalid.polymorphic.qualifier.use", poly)); } From f72cd977dda9d9e67b45bd8e3062881f791f0745 Mon Sep 17 00:00:00 2001 From: Aosen Xiong Date: Sun, 31 Mar 2024 19:15:09 -0400 Subject: [PATCH 2/3] Trigger CI build From e880fc44a7917b55454c686bd3f91ce947c8ad0d Mon Sep 17 00:00:00 2001 From: Aosen Xiong Date: Sun, 31 Mar 2024 20:36:11 -0400 Subject: [PATCH 3/3] Use hasAnnotation for precise check --- .../org/checkerframework/common/basetype/BaseTypeVisitor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 2922a504527..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.hasExplicitAnnotation(poly)) { + if (type.hasAnnotation(poly)) { return Collections.singletonList( DiagMessage.error("invalid.polymorphic.qualifier.use", poly)); }