From 9a839d706291fdd57aeb48c3f64654afbd144a83 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Tue, 17 Dec 2013 19:19:41 +0100 Subject: Three bugfixes to typing. --- src/dotty/tools/dotc/typer/Namer.scala | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/dotty/tools/dotc/typer/Namer.scala') diff --git a/src/dotty/tools/dotc/typer/Namer.scala b/src/dotty/tools/dotc/typer/Namer.scala index e0b9c399f..9d0ec539c 100644 --- a/src/dotty/tools/dotc/typer/Namer.scala +++ b/src/dotty/tools/dotc/typer/Namer.scala @@ -7,7 +7,7 @@ import ast._ import Trees._, Constants._, StdNames._, Scopes._, Denotations._ import Contexts._, Symbols._, Types._, SymDenotations._, Names._, NameOps._, Flags._, Decorators._ import ast.desugar, ast.desugar._ -import Inferencing.{fullyDefinedType, AnySelectionProto} +import Inferencing.{fullyDefinedType, AnySelectionProto, checkClassTypeWithStablePrefix} import util.Positions._ import util.SourcePosition import collection.mutable @@ -348,9 +348,9 @@ class Namer { typer: Typer => } val Select(New(tpt), nme.CONSTRUCTOR) = core val targs1 = targs map (typedAheadType(_)) - val ptype = typedAheadType(tpt).tpe appliedTo targs1.tpes - if (ptype.uninstantiatedTypeParams.isEmpty) ptype - else typedAheadExpr(constr).tpe + var ptype = typedAheadType(tpt).tpe appliedTo targs1.tpes + if (ptype.uninstantiatedTypeParams.nonEmpty) ptype = typedAheadExpr(constr).tpe + checkClassTypeWithStablePrefix(ptype, core.pos) } val TypeDef(_, name, impl @ Template(constr, parents, self, body)) = cdef -- cgit v1.2.3