Skip to content

Commit e35dc2a

Browse files
committed
Rename meta annotation sets
1 parent 8c512cd commit e35dc2a

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

compiler/src/dotty/tools/dotc/core/Definitions.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1039,10 +1039,10 @@ class Definitions {
10391039
@tu lazy val JavaRepeatableAnnot: ClassSymbol = requiredClass("java.lang.annotation.Repeatable")
10401040

10411041
// A list of meta-annotations that are relevant for fields and accessors
1042-
@tu lazy val FieldAccessorMetaAnnots: Set[Symbol] =
1042+
@tu lazy val NonBeanMetaAnnots: Set[Symbol] =
10431043
Set(FieldMetaAnnot, GetterMetaAnnot, ParamMetaAnnot, SetterMetaAnnot)
1044-
@tu lazy val ExtFieldAccessorMetaAnnots: Set[Symbol] =
1045-
FieldAccessorMetaAnnots + BeanGetterMetaAnnot + BeanSetterMetaAnnot
1044+
@tu lazy val MetaAnnots: Set[Symbol] =
1045+
NonBeanMetaAnnots + BeanGetterMetaAnnot + BeanSetterMetaAnnot
10461046

10471047
// A list of annotations that are commonly used to indicate that a field/method argument or return
10481048
// type is not null. These annotations are used by the nullification logic in JavaNullInterop to

compiler/src/dotty/tools/dotc/transform/Memoize.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ class Memoize extends MiniPhase with IdentityDenotTransformer { thisPhase =>
117117
)
118118
fieldSym.annotations = sym.annotations.filterConserve { annot =>
119119
annot.hasOneOfMetaAnnotation(defn.FieldMetaAnnot)
120-
|| !annot.hasOneOfMetaAnnotation(defn.ExtFieldAccessorMetaAnnots.toList*)
120+
|| !annot.hasOneOfMetaAnnotation(defn.MetaAnnots.toList*)
121121
}
122122
fieldSym.enteredAfter(thisPhase)
123123
}

compiler/src/dotty/tools/dotc/transform/PostTyper.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ class PostTyper extends MacroTransform with IdentityDenotTransformer { thisPhase
188188
metaAnnotSymBackup: Symbol, keepIfNoRelevantAnnot: Boolean)(using Context): Unit =
189189
def shouldKeep(annot: Annotation): Boolean =
190190
annot.hasOneOfMetaAnnotation(metaAnnotSym, metaAnnotSymBackup)
191-
|| keepIfNoRelevantAnnot && !annot.hasOneOfMetaAnnotation(defn.FieldAccessorMetaAnnots.toList*)
191+
|| keepIfNoRelevantAnnot && !annot.hasOneOfMetaAnnotation(defn.NonBeanMetaAnnots.toList*)
192192
if sym.annotations.nonEmpty then
193193
sym.filterAnnotations(shouldKeep(_))
194194

0 commit comments

Comments
 (0)