@@ -609,7 +609,7 @@ trait Printers
609
609
610
610
def printParent (parent : TermOrTypeTree , needEmptyParens : Boolean = false ): Unit = parent match {
611
611
case IsTypeTree (parent) =>
612
- printTypeTree(parent)
612
+ printTypeTree(parent, Some (cdef.symbol) )
613
613
case IsTerm (Term .TypeApply (fun, targs)) =>
614
614
printParent(fun)
615
615
case IsTerm (Term .Apply (fun@ Term .Apply (_,_), args)) =>
@@ -621,7 +621,7 @@ trait Printers
621
621
if (! args.isEmpty || needEmptyParens)
622
622
inParens(printTrees(args, " , " ))
623
623
case IsTerm (Term .Select (Term .New (tpt), _)) =>
624
- printTypeTree(tpt)
624
+ printTypeTree(tpt, Some (cdef.symbol) )
625
625
case IsTerm (parent) =>
626
626
throw new MatchError (parent.show)
627
627
}
@@ -1359,6 +1359,8 @@ trait Printers
1359
1359
* NoSymbol means the current type is not a self type annotation.
1360
1360
* Self type annotation should elide current class prefix to avoid
1361
1361
* cyclic type checking error.
1362
+ *
1363
+ * It is also used in parent list to avoid `this` prefix.
1362
1364
*/
1363
1365
def printTypeTree (tree : TypeTree , selfIn : Option [Symbol ] = None ): Buffer = tree match {
1364
1366
case TypeTree .Inferred () =>
@@ -1470,6 +1472,8 @@ trait Printers
1470
1472
* @param selfIn The current type is a self type in the indicated class.
1471
1473
* Self type annotation should elide current class prefix to avoid
1472
1474
* cyclic type checking error.
1475
+ *
1476
+ * It is also used in parent list to avoid `this` prefix.
1473
1477
*/
1474
1478
def printType (tpe : Type , selfIn : Option [Symbol ] = None ): Buffer = tpe match {
1475
1479
case Type .ConstantType (const) =>
0 commit comments