aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/TypeAssigner.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-09-21 14:45:36 +0200
committerDmitry Petrashko <dmitry.petrashko@gmail.com>2014-10-11 08:24:36 +0200
commitd288981f42cd8fde42340264a73d30e037bffec5 (patch)
treebd9371b9c000c06c1d830d8b3f04836da9979451 /src/dotty/tools/dotc/typer/TypeAssigner.scala
parentce81244e6c4fc7b5b8ccc70ad32290045a591739 (diff)
downloaddotty-d288981f42cd8fde42340264a73d30e037bffec5.tar.gz
dotty-d288981f42cd8fde42340264a73d30e037bffec5.tar.bz2
dotty-d288981f42cd8fde42340264a73d30e037bffec5.zip
Fix tree typing to account for trees after constructors is run.
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 5604a607c..79d86de06 100644
--- a/src/dotty/tools/dotc/typer/TypeAssigner.scala
+++ b/src/dotty/tools/dotc/typer/TypeAssigner.scala
@@ -235,7 +235,7 @@ trait TypeAssigner {
}
val owntype =
if (!mix.isEmpty) findMixinSuper(cls.info)
- else if (inConstrCall) cls.info.firstParent
+ else if (inConstrCall || ctx.erasedTypes) cls.info.firstParent
else {
val ps = cls.info.parents
if (ps.isEmpty) defn.AnyType else ps.reduceLeft((x: Type, y: Type) => x & y)