aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/TypeOps.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-06-29 19:01:12 +0200
committerMartin Odersky <odersky@gmail.com>2016-07-11 13:34:58 +0200
commitd30f441ae986c144e739223be97b906b3bbd43dc (patch)
treeb7ba96597290a345dd9a92e3e0275f8a340fe766 /src/dotty/tools/dotc/core/TypeOps.scala
parent5866d0d16c79ca5c62507bdcb7d87669426e86d6 (diff)
downloaddotty-d30f441ae986c144e739223be97b906b3bbd43dc.tar.gz
dotty-d30f441ae986c144e739223be97b906b3bbd43dc.tar.bz2
dotty-d30f441ae986c144e739223be97b906b3bbd43dc.zip
Allow general recursion in refined types.
Treat parent like refinedInfo. Introduce isBinding convenience method in TypeBounds.
Diffstat (limited to 'src/dotty/tools/dotc/core/TypeOps.scala')
-rw-r--r--src/dotty/tools/dotc/core/TypeOps.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/core/TypeOps.scala b/src/dotty/tools/dotc/core/TypeOps.scala
index 1288c0b23..72b0c87c4 100644
--- a/src/dotty/tools/dotc/core/TypeOps.scala
+++ b/src/dotty/tools/dotc/core/TypeOps.scala
@@ -364,8 +364,8 @@ trait TypeOps { this: Context => // TODO: Make standalone object.
def normalizeToRef(tp: Type): TypeRef = tp.dealias match {
case tp: TypeRef =>
tp
- case tp @ RefinedType(tp1, name: TypeName) =>
- tp.refinedInfo match {
+ case tp @ RefinedType(tp1, name: TypeName, rinfo) =>
+ rinfo match {
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")