aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/Types.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-03-06 09:43:14 +0100
committerMartin Odersky <odersky@gmail.com>2014-03-07 11:12:33 +0100
commitccb4f8afb7af71364c1b3d0f6565d686155a8e66 (patch)
tree8b709434bba9d894d76bfbfd2d4308403959100a /src/dotty/tools/dotc/core/Types.scala
parent3a503cf9a05e5dc6e3fbf06419b6ca5b8c6ed14e (diff)
downloaddotty-ccb4f8afb7af71364c1b3d0f6565d686155a8e66.tar.gz
dotty-ccb4f8afb7af71364c1b3d0f6565d686155a8e66.tar.bz2
dotty-ccb4f8afb7af71364c1b3d0f6565d686155a8e66.zip
Fix problem in TermRef.alternatives
Rewrap needs to produce alternatives with signatures. Otgerwise the new denotation will simply overwrite the old because both the overloaded TermRef and the alternative will hash to the same unique TermRef.
Diffstat (limited to 'src/dotty/tools/dotc/core/Types.scala')
-rw-r--r--src/dotty/tools/dotc/core/Types.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/core/Types.scala b/src/dotty/tools/dotc/core/Types.scala
index f9c8aad5c..bb30d9a9c 100644
--- a/src/dotty/tools/dotc/core/Types.scala
+++ b/src/dotty/tools/dotc/core/Types.scala
@@ -1140,7 +1140,7 @@ object Types {
override def isOverloaded(implicit ctx: Context) = denot.isOverloaded
private def rewrap(sd: SingleDenotation)(implicit ctx: Context) =
- TermRef(prefix, name, sd)
+ TermRef.withSig(prefix, name, sd.signature, sd)
def alternatives(implicit ctx: Context): List[TermRef] =
denot.alternatives map rewrap