aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/TypeOps.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-01-10 17:39:16 +0100
committerMartin Odersky <odersky@gmail.com>2016-02-19 14:00:00 +0100
commitb79c5b4281952ab6cc501da8b20e7ae7f75ab44e (patch)
tree2b0c9f7ab38f7697213e74a64d5ae7019c69e85b /src/dotty/tools/dotc/core/TypeOps.scala
parent6947b630bada85dabd7904ecf5d1da724c5d281d (diff)
downloaddotty-b79c5b4281952ab6cc501da8b20e7ae7f75ab44e.tar.gz
dotty-b79c5b4281952ab6cc501da8b20e7ae7f75ab44e.tar.bz2
dotty-b79c5b4281952ab6cc501da8b20e7ae7f75ab44e.zip
Make named parameter alias handling more robust
After unpickling we might see an alias X = pre.X where pre =:= the ThisType of the enclosing class. But it might not be `eq` to it.
Diffstat (limited to 'src/dotty/tools/dotc/core/TypeOps.scala')
-rw-r--r--src/dotty/tools/dotc/core/TypeOps.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/core/TypeOps.scala b/src/dotty/tools/dotc/core/TypeOps.scala
index 420333695..734d31858 100644
--- a/src/dotty/tools/dotc/core/TypeOps.scala
+++ b/src/dotty/tools/dotc/core/TypeOps.scala
@@ -445,7 +445,7 @@ trait TypeOps { this: Context => // TODO: Make standalone object.
tp
case tp @ RefinedType(tp1, name: TypeName) =>
tp.refinedInfo match {
- case TypeAlias(TypeRef(pre, name1)) if (pre eq cls.thisType) && name1 == name =>
+ case TypeAlias(TypeRef(pre, name1)) if name1 == name && (pre =:= cls.thisType) =>
// Don't record refinements of the form X = this.X (These can arise using named parameters).
typr.println(s"dropping refinement $tp")
case _ =>