File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed
distage/distage-core-api/src/main/scala/izumi/distage/model/reflection/universe
fundamentals/fundamentals-reflection/src/main/scala/izumi/fundamentals/reflection Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ trait WithDISymbolInfo { this: DIUniverseBase with WithDISafeType =>
8585 SymbolInfo .Static (
8686 name = transformName(tpe.typeSymbol.name.toString),
8787 finalResultType = tpe,
88- annotations = AnnotationTools .getAllTypeAnnotations[u. type ] (tpe),
88+ annotations = AnnotationTools .getAllTypeAnnotations(u) (tpe),
8989 isByName = tpe.typeSymbol.isClass && tpe.typeSymbol.asClass == u.definitions.ByNameParamClass ,
9090 wasGeneric = tpe.typeSymbol.isParameter,
9191 )
Original file line number Diff line number Diff line change 11package izumi .fundamentals .reflection
22
3+ import izumi .fundamentals .reflection .ReflectionUtil .stripByName
4+
5+ import scala .annotation .nowarn
36import scala .reflect .api .Universe
47
58object AnnotationTools {
69
710 def getAllAnnotations (u : Universe )(symb : u.Symbol ): List [u.Annotation ] = {
8- symb.annotations ++ getAllTypeAnnotations[u. type ] (symb.typeSignature)
11+ symb.annotations ++ getAllTypeAnnotations(u) (symb.typeSignature)
912 }
1013
11- def getAllTypeAnnotations [U <: Universe with Singleton ](typ : U # Type ): List [U # Annotation ] = {
12- typ.finalResultType.dealias match {
13- case t : U # AnnotatedTypeApi =>
14+ def getAllTypeAnnotations (u : Universe )(typ : u.Type ): List [u.Annotation ] = {
15+ @ nowarn(" msg=outer reference" )
16+ val out = stripByName(u)(typ.finalResultType.dealias) match {
17+ case t : u.AnnotatedTypeApi =>
1418 t.annotations
1519 case _ =>
1620 Nil
1721 }
22+ out
1823 }
1924
2025 def annotationTypeEq (u : Universe )(tpe : u.Type , ann : u.Annotation ): Boolean = {
You can’t perform that action at this time.
0 commit comments