aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/TypeAssigner.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2015-12-18 18:50:18 +0100
committerMartin Odersky <odersky@gmail.com>2015-12-18 18:50:40 +0100
commitd362455add3fcfb99d87c1e8290d9f6e1bf23654 (patch)
tree279b5cf47618b27783b3507297db52a3c863c7bb /src/dotty/tools/dotc/typer/TypeAssigner.scala
parent570cf0f84b0daa78a6234ead4b5b3c5b58b5db79 (diff)
downloaddotty-d362455add3fcfb99d87c1e8290d9f6e1bf23654.tar.gz
dotty-d362455add3fcfb99d87c1e8290d9f6e1bf23654.tar.bz2
dotty-d362455add3fcfb99d87c1e8290d9f6e1bf23654.zip
Fix higher-kinded unions and intersections
Since And/Or type themselves are parameterless, their the union and intersection of hgiher-kinded types has to be treated specially: The types have to be pulled under a common lambda.
Diffstat (limited to 'src/dotty/tools/dotc/typer/TypeAssigner.scala')
-rw-r--r--src/dotty/tools/dotc/typer/TypeAssigner.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/typer/TypeAssigner.scala b/src/dotty/tools/dotc/typer/TypeAssigner.scala
index 2b7eb3936..42ee513cd 100644
--- a/src/dotty/tools/dotc/typer/TypeAssigner.scala
+++ b/src/dotty/tools/dotc/typer/TypeAssigner.scala
@@ -282,7 +282,7 @@ trait TypeAssigner {
else if (!mix.isEmpty) findMixinSuper(cls.info)
else if (inConstrCall || ctx.erasedTypes) cls.info.firstParent
else {
- val ps = cls.info.parents
+ val ps = cls.classInfo.instantiatedParents
if (ps.isEmpty) defn.AnyType else ps.reduceLeft((x: Type, y: Type) => x & y)
}
tree.withType(SuperType(cls.thisType, owntype))