From 4356ac7a1d2cae67d80af84c64a6c2d941a11b4b Mon Sep 17 00:00:00 2001 From: Adriaan Moors Date: Thu, 18 Feb 2016 15:47:44 -0800 Subject: TypeHistory's toString time travels consistently For each history entry, run the `Type`'s `toString` at the corresponding phase, so that e.g., a method type's parameter symbols' `info`'s `toString` runs at the phase corresponding to the type history we're turning into a string. --- src/reflect/scala/reflect/internal/Symbols.scala | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/reflect/scala/reflect/internal/Symbols.scala b/src/reflect/scala/reflect/internal/Symbols.scala index 34f9417e57..0cbb45d12d 100644 --- a/src/reflect/scala/reflect/internal/Symbols.scala +++ b/src/reflect/scala/reflect/internal/Symbols.scala @@ -3642,7 +3642,10 @@ trait Symbols extends api.Symbols { self: SymbolTable => assert((prev eq null) || phaseId(validFrom) > phaseId(prev.validFrom), this) assert(validFrom != NoPeriod, this) - private def phaseString = "%s: %s".format(phaseOf(validFrom), info) + private def phaseString = { + val phase = phaseOf(validFrom) + s"$phase: ${exitingPhase(phase)(info.toString)}" + } override def toString = toList reverseMap (_.phaseString) mkString ", " def toList: List[TypeHistory] = this :: ( if (prev eq null) Nil else prev.toList ) -- cgit v1.2.3