diff options
author | Martin Odersky <odersky@gmail.com> | 2017-03-28 22:25:09 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2017-04-11 09:33:11 +0200 |
commit | ca5652cc5a74f00277ce942a001fa6e931ee3728 (patch) | |
tree | 9ef6e2b341bc10678bbe1f06d4c15fb28093da07 /compiler/src/dotty/tools/dotc/core/Types.scala | |
parent | 1e49ddad97c4e8207913857511ae62467f8cd3ce (diff) | |
download | dotty-ca5652cc5a74f00277ce942a001fa6e931ee3728.tar.gz dotty-ca5652cc5a74f00277ce942a001fa6e931ee3728.tar.bz2 dotty-ca5652cc5a74f00277ce942a001fa6e931ee3728.zip |
Make freshName semantic
Diffstat (limited to 'compiler/src/dotty/tools/dotc/core/Types.scala')
-rw-r--r-- | compiler/src/dotty/tools/dotc/core/Types.scala | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/src/dotty/tools/dotc/core/Types.scala b/compiler/src/dotty/tools/dotc/core/Types.scala index b2502ee94..3f5a30922 100644 --- a/compiler/src/dotty/tools/dotc/core/Types.scala +++ b/compiler/src/dotty/tools/dotc/core/Types.scala @@ -7,7 +7,7 @@ import Symbols._ import Flags._ import Names._ import StdNames._, NameOps._ -import NameExtractors.ShadowedName +import NameExtractors.{ShadowedName, SkolemName} import Scopes._ import Constants._ import Contexts._ @@ -3001,9 +3001,9 @@ object Types { override def hashCode: Int = identityHash override def equals(that: Any) = this eq that.asInstanceOf[AnyRef] - private var myRepr: String = null - def repr(implicit ctx: Context) = { - if (myRepr == null) myRepr = ctx.freshName("?") + private var myRepr: Name = null + def repr(implicit ctx: Context): Name = { + if (myRepr == null) myRepr = SkolemName.fresh() myRepr } |