File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
modules/deriving/src/main/scala/shapeless3/deriving Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -133,7 +133,8 @@ object AnnotationMacros {
133
133
' {??? }
134
134
} else {
135
135
val annoteeTpe = TypeRepr .of[T ]
136
- annoteeTpe.typeSymbol.annots.find(_.tpe <:< annotTpe) match {
136
+ // TODO try to use `getAnnotation` for performance
137
+ annoteeTpe.typeSymbol.annotations.find(_.tpe <:< annotTpe) match {
137
138
case Some (tree) => ' { Annotation .mkAnnotation[A , T ]($ {tree.asExprOf[A ]}) }
138
139
case None =>
139
140
report.error(s " No Annotation of type ${annotTpe.show} for type ${annoteeTpe.show}" )
@@ -159,7 +160,8 @@ object AnnotationMacros {
159
160
}
160
161
161
162
def findAnnotation [A : Type ](annoteeSym : Symbol ): Expr [Option [A ]] =
162
- annoteeSym.annots.find(_.tpe <:< TypeRepr .of[A ]) match {
163
+ // TODO try to use `getAnnotation` for performance
164
+ annoteeSym.annotations.find(_.tpe <:< TypeRepr .of[A ]) match {
163
165
case Some (tree) => ' { Some ($ {tree.asExprOf[A ]}) }
164
166
case None => ' { None }
165
167
}
You can’t perform that action at this time.
0 commit comments