diff options
author | Martin Odersky <odersky@gmail.com> | 2014-08-18 13:34:12 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2014-08-18 13:34:12 +0200 |
commit | 0f6a277d3ab17f7d7011a3a29833a4ed12bb30ff (patch) | |
tree | 9fb51dc777b0b98b6d9181664e71db95c53b4459 /src/dotty/tools/dotc/core/Types.scala | |
parent | aae71e7e37761aa159b0d00f7b98a388be9a40cf (diff) | |
download | dotty-0f6a277d3ab17f7d7011a3a29833a4ed12bb30ff.tar.gz dotty-0f6a277d3ab17f7d7011a3a29833a4ed12bb30ff.tar.bz2 dotty-0f6a277d3ab17f7d7011a3a29833a4ed12bb30ff.zip |
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.
Diffstat (limited to 'src/dotty/tools/dotc/core/Types.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/Types.scala | 10 |
1 files changed, 5 insertions, 5 deletions
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) } } |