@@ -312,10 +312,6 @@ trait Printers
312312 this += " Type.TermRef(" += qual+= " , \" " += name += " \" )"
313313 case Type .TypeRef (qual, name) =>
314314 this += " Type.TypeRef(" += qual += " , \" " += name += " \" )"
315- case Type .NamedTermRef (qual, name) =>
316- this += " Type.NamedTermRef(" += qual += " , \" " += name += " \" )"
317- case Type .NamedTypeRef (qual, name) =>
318- this += " Type.NamedTypeRef(" += qual += " , \" " += name += " \" )"
319315 case Type .Refinement (parent, name, info) =>
320316 this += " Type.Refinement(" += parent += " , " += name += " , " += info += " )"
321317 case Type .AppliedType (tycon, args) =>
@@ -1555,35 +1551,14 @@ trait Printers
15551551 this
15561552 }
15571553
1558- case Type .NamedTermRef (prefix, name) =>
1559- prefix match {
1560- case Type .ThisType (Types .EmptyPackage ()) =>
1561- this += highlightTypeDef(name)
1562- case IsType (prefix) =>
1563- printType(prefix)
1564- if (name != " package" )
1565- this += " ." += highlightTypeDef(name)
1566- this
1567- case NoPrefix () =>
1568- this += highlightTypeDef(name)
1569- }
1570-
1571- case Type .NamedTypeRef (prefix, name) =>
1572- prefix match {
1573- case NoPrefix () | Type .ThisType (Types .EmptyPackage ()) =>
1574- case IsType (prefix) => printType(prefix) += " ."
1575- }
1576- if (name.endsWith(" $" )) this += highlightTypeDef(name.stripSuffix(" $" )) += " .type"
1577- else this += highlightTypeDef(name)
1578-
15791554 case tpe @ Type .Refinement (_, _, _) =>
15801555 printRefinement(tpe)
15811556
15821557 case Type .AppliedType (tp, args) =>
15831558 tp match {
15841559 case Type .IsTypeLambda (tp) =>
15851560 printType(tpe.dealias)
1586- case Type .NamedTypeRef (Types .ScalaPackage (), " <repeated>" ) =>
1561+ case Type .TypeRef (Types .ScalaPackage (), " <repeated>" ) =>
15871562 this += " _*"
15881563 case _ =>
15891564 printType(tp)
@@ -1620,7 +1595,7 @@ trait Printers
16201595 case Type .IsTypeRef (tp) if ! tp.typeSymbol.flags.is(Flags .Object ) =>
16211596 printFullClassName(tp)
16221597 this += highlightTypeDef(" .this" )
1623- case Type .NamedTypeRef (prefix, name) if name.endsWith(" $" ) =>
1598+ case Type .TypeRef (prefix, name) if name.endsWith(" $" ) =>
16241599 prefix match {
16251600 case NoPrefix () | Type .ThisType (Types .EmptyPackage () | Types .RootPackage ()) =>
16261601 case _ =>
@@ -1707,9 +1682,9 @@ trait Printers
17071682 val annots = definition.symbol.annots.filter {
17081683 case Annotation (annot, _) =>
17091684 annot.tpe match {
1710- case Type .NamedTypeRef (Type .IsTermRef (prefix), _) if prefix.termSymbol.fullName == " scala.annotation.internal" => false
1711- case Type .NamedTypeRef (Type .IsTypeRef (prefix), _) if prefix.typeSymbol.fullName == " scala.annotation.internal" => false
1712- case Type .NamedTypeRef (Types .ScalaPackage (), " forceInline" ) => false
1685+ case Type .TypeRef (Type .IsTermRef (prefix), _) if prefix.termSymbol.fullName == " scala.annotation.internal" => false
1686+ case Type .TypeRef (Type .IsTypeRef (prefix), _) if prefix.typeSymbol.fullName == " scala.annotation.internal" => false
1687+ case Type .TypeRef (Types .ScalaPackage (), " forceInline" ) => false
17131688 case _ => true
17141689 }
17151690 case x => throw new MatchError (x.showExtractors)
@@ -1893,30 +1868,30 @@ trait Printers
18931868
18941869 object JavaLangObject {
18951870 def unapply (tpe : Type ) given (ctx : Context ): Boolean = tpe match {
1896- case Type .NamedTypeRef (Type .IsTermRef (prefix), " Object" ) => prefix.typeSymbol.fullName == " java.lang"
1871+ case Type .TypeRef (Type .IsTermRef (prefix), " Object" ) => prefix.typeSymbol.fullName == " java.lang"
18971872 case _ => false
18981873 }
18991874 }
19001875
19011876 object Sequence {
19021877 def unapply (tpe : Type ) given (ctx : Context ): Option [Type ] = tpe match {
1903- case Type .AppliedType (Type .NamedTypeRef (Type .IsTermRef (prefix), " Seq" ), IsType (tp) :: Nil ) if prefix.termSymbol.fullName == " scala.collection" => Some (tp)
1904- case Type .AppliedType (Type .NamedTypeRef (Type .IsTypeRef (prefix), " Seq" ), IsType (tp) :: Nil ) if prefix.typeSymbol.fullName == " scala.collection" => Some (tp)
1878+ case Type .AppliedType (Type .TypeRef (Type .IsTermRef (prefix), " Seq" ), IsType (tp) :: Nil ) if prefix.termSymbol.fullName == " scala.collection" => Some (tp)
1879+ case Type .AppliedType (Type .TypeRef (Type .IsTypeRef (prefix), " Seq" ), IsType (tp) :: Nil ) if prefix.typeSymbol.fullName == " scala.collection" => Some (tp)
19051880 case _ => None
19061881 }
19071882 }
19081883
19091884 object RepeatedAnnotation {
19101885 def unapply (tpe : Type ) given (ctx : Context ): Boolean = tpe match {
1911- case Type .NamedTypeRef (Type .IsTermRef (prefix), " Repeated" ) => prefix.termSymbol.fullName == " scala.annotation.internal"
1912- case Type .NamedTypeRef (Type .IsTypeRef (prefix), " Repeated" ) => prefix.typeSymbol.fullName == " scala.annotation.internal"
1886+ case Type .TypeRef (Type .IsTermRef (prefix), " Repeated" ) => prefix.termSymbol.fullName == " scala.annotation.internal"
1887+ case Type .TypeRef (Type .IsTypeRef (prefix), " Repeated" ) => prefix.typeSymbol.fullName == " scala.annotation.internal"
19131888 case _ => false
19141889 }
19151890 }
19161891
19171892 object Repeated {
19181893 def unapply (tpe : Type ) given (ctx : Context ): Option [Type ] = tpe match {
1919- case Type .AppliedType (Type .NamedTypeRef (ScalaPackage (), " <repeated>" ), IsType (tp) :: Nil ) => Some (tp)
1894+ case Type .AppliedType (Type .TypeRef (ScalaPackage (), " <repeated>" ), IsType (tp) :: Nil ) => Some (tp)
19201895 case _ => None
19211896 }
19221897 }
0 commit comments