@@ -1243,8 +1243,7 @@ class SourceCodePrinter[R <: Reflection & Singleton](val tasty: R)(syntaxHighlig
1243
1243
val annots = definition.symbol.annots.filter {
1244
1244
case Annotation (annot, _) =>
1245
1245
annot.tpe match {
1246
- case TypeRef (prefix : TermRef , _) if prefix.termSymbol == ctx.requiredPackage(" scala.annotation.internal" ) => false
1247
- case TypeRef (prefix : TypeRef , _) if prefix.typeSymbol == ctx.requiredPackage(" scala.annotation.internal" ) => false
1246
+ case tpe @ TypeRef if tpe.typeSymbol.maybeOwner == ctx.requiredPackage(" scala.annotation.internal" ) => false
1248
1247
case TypeRef (Types .ScalaPackage (), " forceInline" ) => false
1249
1248
case _ => true
1250
1249
}
@@ -1444,16 +1443,14 @@ class SourceCodePrinter[R <: Reflection & Singleton](val tasty: R)(syntaxHighlig
1444
1443
1445
1444
object Sequence {
1446
1445
def unapply (tpe : Type )(given ctx : Context ): Option [Type ] = tpe match {
1447
- case AppliedType (TypeRef (prefix : TermRef , " Seq" ), (tp : Type ) :: Nil ) if prefix.termSymbol == ctx.requiredPackage(" scala.collection" ) => Some (tp)
1448
- case AppliedType (TypeRef (prefix : TypeRef , " Seq" ), (tp : Type ) :: Nil ) if prefix.typeSymbol == ctx.requiredPackage(" scala.collection" ) => Some (tp)
1446
+ case AppliedType (seq, (tp : Type ) :: Nil ) if seq.typeSymbol == ctx.requiredClass(" scala.collection.Seq" ) => Some (tp)
1449
1447
case _ => None
1450
1448
}
1451
1449
}
1452
1450
1453
1451
object RepeatedAnnotation {
1454
1452
def unapply (tpe : Type )(given ctx : Context ): Boolean = tpe match {
1455
- case TypeRef (prefix : TermRef , " Repeated" ) => prefix.termSymbol == ctx.requiredPackage(" scala.annotation.internal" )
1456
- case TypeRef (prefix : TypeRef , " Repeated" ) => prefix.typeSymbol == ctx.requiredPackage(" scala.annotation.internal" )
1453
+ case tpe : TypeRef => tpe.typeSymbol == ctx.requiredClass(" scala.annotation.internal.Repeated" )
1457
1454
case _ => false
1458
1455
}
1459
1456
}
0 commit comments