@@ -312,10 +312,6 @@ trait Printers
312
312
this += " Type.TermRef(" += qual+= " , \" " += name += " \" )"
313
313
case Type .TypeRef (qual, name) =>
314
314
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 += " \" )"
319
315
case Type .Refinement (parent, name, info) =>
320
316
this += " Type.Refinement(" += parent += " , " += name += " , " += info += " )"
321
317
case Type .AppliedType (tycon, args) =>
@@ -1555,35 +1551,14 @@ trait Printers
1555
1551
this
1556
1552
}
1557
1553
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
-
1579
1554
case tpe @ Type .Refinement (_, _, _) =>
1580
1555
printRefinement(tpe)
1581
1556
1582
1557
case Type .AppliedType (tp, args) =>
1583
1558
tp match {
1584
1559
case Type .IsTypeLambda (tp) =>
1585
1560
printType(tpe.dealias)
1586
- case Type .NamedTypeRef (Types .ScalaPackage (), " <repeated>" ) =>
1561
+ case Type .TypeRef (Types .ScalaPackage (), " <repeated>" ) =>
1587
1562
this += " _*"
1588
1563
case _ =>
1589
1564
printType(tp)
@@ -1620,7 +1595,7 @@ trait Printers
1620
1595
case Type .IsTypeRef (tp) if ! tp.typeSymbol.flags.is(Flags .Object ) =>
1621
1596
printFullClassName(tp)
1622
1597
this += highlightTypeDef(" .this" )
1623
- case Type .NamedTypeRef (prefix, name) if name.endsWith(" $" ) =>
1598
+ case Type .TypeRef (prefix, name) if name.endsWith(" $" ) =>
1624
1599
prefix match {
1625
1600
case NoPrefix () | Type .ThisType (Types .EmptyPackage () | Types .RootPackage ()) =>
1626
1601
case _ =>
@@ -1707,9 +1682,9 @@ trait Printers
1707
1682
val annots = definition.symbol.annots.filter {
1708
1683
case Annotation (annot, _) =>
1709
1684
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
1713
1688
case _ => true
1714
1689
}
1715
1690
case x => throw new MatchError (x.showExtractors)
@@ -1893,30 +1868,30 @@ trait Printers
1893
1868
1894
1869
object JavaLangObject {
1895
1870
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"
1897
1872
case _ => false
1898
1873
}
1899
1874
}
1900
1875
1901
1876
object Sequence {
1902
1877
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)
1905
1880
case _ => None
1906
1881
}
1907
1882
}
1908
1883
1909
1884
object RepeatedAnnotation {
1910
1885
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"
1913
1888
case _ => false
1914
1889
}
1915
1890
}
1916
1891
1917
1892
object Repeated {
1918
1893
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)
1920
1895
case _ => None
1921
1896
}
1922
1897
}
0 commit comments