@@ -312,10 +312,10 @@ 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 (name, qual ) =>
316
- this += " Type.NamedTermRef(\" " += name += " \" , " += qual += " )"
317
- case Type .NamedTypeRef (name, qual ) =>
318
- this += " Type.NamedTypeRef(\" " += name += " \" , " += qual += " )"
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
319
case Type .Refinement (parent, name, info) =>
320
320
this += " Type.Refinement(" += parent += " , " += name += " , " += info += " )"
321
321
case Type .AppliedType (tycon, args) =>
@@ -1555,7 +1555,7 @@ trait Printers
1555
1555
this
1556
1556
}
1557
1557
1558
- case Type .NamedTermRef (name, prefix ) =>
1558
+ case Type .NamedTermRef (prefix, name ) =>
1559
1559
prefix match {
1560
1560
case Type .ThisType (Types .EmptyPackage ()) =>
1561
1561
this += highlightTypeDef(name)
@@ -1568,7 +1568,7 @@ trait Printers
1568
1568
this += highlightTypeDef(name)
1569
1569
}
1570
1570
1571
- case Type .NamedTypeRef (name, prefix ) =>
1571
+ case Type .NamedTypeRef (prefix, name ) =>
1572
1572
prefix match {
1573
1573
case NoPrefix () | Type .ThisType (Types .EmptyPackage ()) =>
1574
1574
case IsType (prefix) => printType(prefix) += " ."
@@ -1583,7 +1583,7 @@ trait Printers
1583
1583
tp match {
1584
1584
case Type .IsTypeLambda (tp) =>
1585
1585
printType(tpe.dealias)
1586
- case Type .NamedTypeRef (" <repeated> " , Types .ScalaPackage ()) =>
1586
+ case Type .NamedTypeRef (Types .ScalaPackage (), " <repeated> " ) =>
1587
1587
this += " _*"
1588
1588
case _ =>
1589
1589
printType(tp)
@@ -1620,7 +1620,7 @@ trait Printers
1620
1620
case Type .IsTypeRef (tp) if ! tp.typeSymbol.flags.is(Flags .Object ) =>
1621
1621
printFullClassName(tp)
1622
1622
this += highlightTypeDef(" .this" )
1623
- case Type .NamedTypeRef (name, prefix ) if name.endsWith(" $" ) =>
1623
+ case Type .NamedTypeRef (prefix, name ) if name.endsWith(" $" ) =>
1624
1624
prefix match {
1625
1625
case NoPrefix () | Type .ThisType (Types .EmptyPackage () | Types .RootPackage ()) =>
1626
1626
case _ =>
@@ -1707,9 +1707,9 @@ trait Printers
1707
1707
val annots = definition.symbol.annots.filter {
1708
1708
case Annotation (annot, _) =>
1709
1709
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 (" forceInline " , Types .ScalaPackage ()) => false
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
1713
1713
case _ => true
1714
1714
}
1715
1715
case x => throw new MatchError (x.showExtractors)
@@ -1893,30 +1893,30 @@ trait Printers
1893
1893
1894
1894
object JavaLangObject {
1895
1895
def unapply (tpe : Type ) given (ctx : Context ): Boolean = tpe match {
1896
- case Type .NamedTypeRef (" Object " , Type .IsTermRef (prefix)) => prefix.typeSymbol.fullName == " java.lang"
1896
+ case Type .NamedTypeRef (Type .IsTermRef (prefix), " Object " ) => prefix.typeSymbol.fullName == " java.lang"
1897
1897
case _ => false
1898
1898
}
1899
1899
}
1900
1900
1901
1901
object Sequence {
1902
1902
def unapply (tpe : Type ) given (ctx : Context ): Option [Type ] = tpe match {
1903
- case Type .AppliedType (Type .NamedTypeRef (" Seq " , Type .IsTermRef (prefix)), IsType (tp) :: Nil ) if prefix.termSymbol.fullName == " scala.collection" => Some (tp)
1904
- case Type .AppliedType (Type .NamedTypeRef (" Seq " , Type .IsTypeRef (prefix)), IsType (tp) :: Nil ) if prefix.typeSymbol.fullName == " scala.collection" => Some (tp)
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)
1905
1905
case _ => None
1906
1906
}
1907
1907
}
1908
1908
1909
1909
object RepeatedAnnotation {
1910
1910
def unapply (tpe : Type ) given (ctx : Context ): Boolean = tpe match {
1911
- case Type .NamedTypeRef (" Repeated " , Type .IsTermRef (prefix)) => prefix.termSymbol.fullName == " scala.annotation.internal"
1912
- case Type .NamedTypeRef (" Repeated " , Type .IsTypeRef (prefix)) => prefix.typeSymbol.fullName == " scala.annotation.internal"
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"
1913
1913
case _ => false
1914
1914
}
1915
1915
}
1916
1916
1917
1917
object Repeated {
1918
1918
def unapply (tpe : Type ) given (ctx : Context ): Option [Type ] = tpe match {
1919
- case Type .AppliedType (Type .NamedTypeRef (" <repeated>" , ScalaPackage () ), IsType (tp) :: Nil ) => Some (tp)
1919
+ case Type .AppliedType (Type .NamedTypeRef (ScalaPackage (), " <repeated>" ), IsType (tp) :: Nil ) => Some (tp)
1920
1920
case _ => None
1921
1921
}
1922
1922
}
0 commit comments