File tree 1 file changed +4
-8
lines changed
library/src/scala/tasty/reflect
1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -1444,8 +1444,10 @@ trait Printers
1444
1444
1445
1445
case Type .SymRef (sym, prefix) =>
1446
1446
prefix match {
1447
- case Types .EmptyPrefix () =>
1447
+ case Type .ThisType (Types .EmptyPackage () | Types .RootPackage ()) =>
1448
+ case NoPrefix () =>
1448
1449
if (sym.owner.flags.is(Flags .Package )) {
1450
+ // TODO should these be in the prefix? These are at least `scala`, `java` and `scala.collection`.
1449
1451
val packagePath = sym.owner.fullName.stripPrefix(" <root>" ).stripPrefix(" <empty>" ).stripPrefix(" ." )
1450
1452
if (packagePath != " " )
1451
1453
this += packagePath += " ."
@@ -1526,7 +1528,7 @@ trait Printers
1526
1528
this += highlightTypeDef(" .this" , color)
1527
1529
case Type .TypeRef (name, prefix) if name.endsWith(" $" ) =>
1528
1530
prefix match {
1529
- case Types .EmptyPrefix ( ) =>
1531
+ case NoPrefix () | Type . ThisType ( Types .EmptyPackage () | Types . RootPackage () ) =>
1530
1532
case _ =>
1531
1533
printTypeOrBound(prefix)
1532
1534
this += " ."
@@ -1823,12 +1825,6 @@ trait Printers
1823
1825
}
1824
1826
}
1825
1827
1826
- object EmptyPrefix {
1827
- def unapply (tpe : TypeOrBounds )(implicit ctx : Context ): Boolean = tpe match {
1828
- case NoPrefix () | Type .ThisType (Types .EmptyPackage () | Types .RootPackage ()) => true
1829
- case _ => false
1830
- }
1831
- }
1832
1828
}
1833
1829
1834
1830
object PackageObject {
You can’t perform that action at this time.
0 commit comments