aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/Typer.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2015-06-05 18:49:36 +0200
committerMartin Odersky <odersky@gmail.com>2015-06-06 11:05:27 +0200
commit080ed2f3d8b5d8fd249691aacc0fe4f9596bb772 (patch)
tree1fac280aa6832c115037e04178d791cc92f9de25 /src/dotty/tools/dotc/typer/Typer.scala
parenteaf3095494af2b0ea028452450a6af44e27f5284 (diff)
downloaddotty-080ed2f3d8b5d8fd249691aacc0fe4f9596bb772.tar.gz
dotty-080ed2f3d8b5d8fd249691aacc0fe4f9596bb772.tar.bz2
dotty-080ed2f3d8b5d8fd249691aacc0fe4f9596bb772.zip
Split RefinedThis and SkolemType
SkolemTypes need to behave differently form RefinedThis types in TypeMap and TypeAccumulator. For skolem types these should follow through to the underlying type. For RefinedThis types, these need to do nothing, in order not to start an infinite recursion.
Diffstat (limited to 'src/dotty/tools/dotc/typer/Typer.scala')
-rw-r--r--src/dotty/tools/dotc/typer/Typer.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/typer/Typer.scala b/src/dotty/tools/dotc/typer/Typer.scala
index fd1d034fd..5f03d19e7 100644
--- a/src/dotty/tools/dotc/typer/Typer.scala
+++ b/src/dotty/tools/dotc/typer/Typer.scala
@@ -812,7 +812,7 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit
if ((rsym.is(Method) || rsym.isType) && rsym.allOverriddenSymbols.isEmpty)
ctx.error(i"refinement $rsym without matching type in parent $parent", refinement.pos)
val rinfo = if (rsym is Accessor) rsym.info.resultType else rsym.info
- RefinedType(parent, rsym.name, rt => rinfo.substThis(refineCls, SkolemType(rt)))
+ RefinedType(parent, rsym.name, rt => rinfo.substThis(refineCls, RefinedThis(rt)))
// todo later: check that refinement is within bounds
}
val res = cpy.RefinedTypeTree(tree)(tpt1, refinements1) withType