From 0f6a277d3ab17f7d7011a3a29833a4ed12bb30ff Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Mon, 18 Aug 2014 13:34:12 +0200 Subject: Fixing handling of self in DeepTypeMap#mapClassInfo The previous version used `self` which referred to the `val` in the implicit TypeOps value class (duh!). We really should make value classes not require to have public fields. --- src/dotty/tools/dotc/core/Types.scala | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/dotty/tools/dotc/core/Types.scala') diff --git a/src/dotty/tools/dotc/core/Types.scala b/src/dotty/tools/dotc/core/Types.scala index e5c86ef44..63f9eb0ab 100644 --- a/src/dotty/tools/dotc/core/Types.scala +++ b/src/dotty/tools/dotc/core/Types.scala @@ -1164,7 +1164,7 @@ object Types { // for overriddenBySynthetic symbols a TermRef such as SomeCaseClass.this.hashCode // might be rewritten from Object#hashCode to the hashCode generated at SyntheticMethods ), - s"data race? overwriting symbol of $this / ${this.getClass} / ${lastSymbol.id} / ${sym.id}") + s"data race? overwriting symbol of ${this.show} / $this / ${this.getClass} / ${lastSymbol.id} / ${sym.id}") protected def sig: Signature = Signature.NotAMethod @@ -2505,11 +2505,11 @@ object Types { override def mapClassInfo(tp: ClassInfo) = { val prefix1 = this(tp.prefix) val parents1 = (tp.parents mapConserve this).asInstanceOf[List[TypeRef]] - val self1 = tp.self match { - case self: Type => this(self) - case _ => tp.self + val selfInfo1 = tp.selfInfo match { + case selfInfo: Type => this(selfInfo) + case selfInfo => selfInfo } - tp.derivedClassInfo(prefix1, parents1, tp.decls, self1) + tp.derivedClassInfo(prefix1, parents1, tp.decls, selfInfo1) } } -- cgit v1.2.3