@@ -743,10 +743,10 @@ class ShowSourceCode[T <: Tasty with Singleton](tasty0: T) extends Show[T](tasty
743743 printTypeAndAnnots(tp)
744744 this += " "
745745 printAnnotation(annot)
746- case Type .SymRef (sym, _) if sym.symbol. isClass && (sym.symbol. fullName == " scala.runtime.Null$" || sym.symbol .fullName == " scala.runtime.Nothing$" ) =>
746+ case Type .SymRef (sym, _) if sym.isClass && (sym.fullName == " scala.runtime.Null$" || sym.fullName == " scala.runtime.Nothing$" ) =>
747747 // scala.runtime.Null$ and scala.runtime.Nothing$ are not modules, those are their actual names
748748 printType(tpe)
749- case tpe @ Type .SymRef (sym, _) if sym.symbol. isClass && sym.name.endsWith(" $" ) =>
749+ case tpe @ Type .SymRef (sym, _) if sym.isClass && sym.name.endsWith(" $" ) =>
750750 printType(tpe)
751751 this += " .type"
752752 case tpe => printType(tpe)
@@ -826,7 +826,7 @@ class ShowSourceCode[T <: Tasty with Singleton](tasty0: T) extends Show[T](tasty
826826 case Type .SymRef (sym, prefix) =>
827827 prefix match {
828828 case Types .EmptyPrefix () =>
829- case IsType (prefix @ Type .SymRef (sym, _)) if sym.symbol. isClass =>
829+ case IsType (prefix @ Type .SymRef (sym, _)) if sym.isClass =>
830830 printType(prefix)
831831 this += " #"
832832 case IsType (prefix) =>
@@ -958,7 +958,7 @@ class ShowSourceCode[T <: Tasty with Singleton](tasty0: T) extends Show[T](tasty
958958 val annots = definition.annots.filter {
959959 case Annotation (annot, _) =>
960960 annot.tpe match {
961- case Type .TypeRef (_, Type .SymRef (sym, _)) if sym.symbol. fullName == " scala.annotation.internal" => false
961+ case Type .TypeRef (_, Type .SymRef (sym, _)) if sym.fullName == " scala.annotation.internal" => false
962962 case Type .TypeRef (" forceInline" , Types .ScalaPackage ()) => false
963963 case _ => true
964964 }
@@ -1055,7 +1055,7 @@ class ShowSourceCode[T <: Tasty with Singleton](tasty0: T) extends Show[T](tasty
10551055 def printProtectedOrPrivate (definition : Definition ): Boolean = {
10561056 var prefixWasPrinted = false
10571057 def printWithin (within : Type ) = within match {
1058- case Type .SymRef (sym @ PackageDef (name, _) , _) =>
1058+ case Type .SymRef (sym, _) =>
10591059 this += sym.name
10601060 case _ => printFullClassName(within)
10611061 }
@@ -1083,7 +1083,7 @@ class ShowSourceCode[T <: Tasty with Singleton](tasty0: T) extends Show[T](tasty
10831083
10841084 def printFullClassName (tp : TypeOrBounds ): Unit = {
10851085 def printClassPrefix (prefix : TypeOrBounds ): Unit = prefix match {
1086- case Type .SymRef (sym, prefix2) if sym.symbol. isClass =>
1086+ case Type .SymRef (sym, prefix2) if sym.isClass =>
10871087 printClassPrefix(prefix2)
10881088 this += sym.name += " ."
10891089 case _ =>
@@ -1122,8 +1122,11 @@ class ShowSourceCode[T <: Tasty with Singleton](tasty0: T) extends Show[T](tasty
11221122 def unapply (arg : Tree )(implicit ctx : Context ): Option [(String , List [Term ])] = arg match {
11231123 case IsTerm (arg @ Term .Apply (fn, args)) =>
11241124 fn.tpe match {
1125- case Type .SymRef (DefDef (op, _, _, _, _), Type .ThisType (Type .SymRef (sym2, _))) if sym2.name == " <special-ops>" =>
1126- Some ((op, args))
1125+ case Type .SymRef (sym, Type .ThisType (Type .SymRef (sym2, _))) if sym2.name == " <special-ops>" =>
1126+ sym.tree match {
1127+ case Some (DefDef (op, _, _, _, _)) => Some ((op, args))
1128+ case _ => None
1129+ }
11271130 case _ => None
11281131 }
11291132 case _ => None
@@ -1144,7 +1147,7 @@ class ShowSourceCode[T <: Tasty with Singleton](tasty0: T) extends Show[T](tasty
11441147
11451148 object JavaLangObject {
11461149 def unapply (tpe : Type )(implicit ctx : Context ): Boolean = tpe match {
1147- case Type .TypeRef (" Object" , Type .SymRef (sym, _)) if sym.symbol. fullName == " java.lang" => true
1150+ case Type .TypeRef (" Object" , Type .SymRef (sym, _)) if sym.fullName == " java.lang" => true
11481151 case _ => false
11491152 }
11501153 }
@@ -1158,21 +1161,21 @@ class ShowSourceCode[T <: Tasty with Singleton](tasty0: T) extends Show[T](tasty
11581161
11591162 object ScalaPackage {
11601163 def unapply (tpe : TypeOrBounds )(implicit ctx : Context ): Boolean = tpe match {
1161- case Type .SymRef (sym, _) => sym.symbol == definitions.ScalaPackage
1164+ case Type .SymRef (sym, _) => sym == definitions.ScalaPackage
11621165 case _ => false
11631166 }
11641167 }
11651168
11661169 object RootPackage {
11671170 def unapply (tpe : TypeOrBounds )(implicit ctx : Context ): Boolean = tpe match {
1168- case Type .SymRef (sym, _) => sym.symbol == definitions.RootClass
1171+ case Type .SymRef (sym, _) => sym == definitions.RootClass
11691172 case _ => false
11701173 }
11711174 }
11721175
11731176 object EmptyPackage {
11741177 def unapply (tpe : TypeOrBounds )(implicit ctx : Context ): Boolean = tpe match {
1175- case Type .SymRef (sym, _) => sym.symbol == definitions.EmptyPackageClass
1178+ case Type .SymRef (sym, _) => sym == definitions.EmptyPackageClass
11761179 case _ => false
11771180 }
11781181 }
0 commit comments