aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/Namer.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2013-12-17 19:19:41 +0100
committerMartin Odersky <odersky@gmail.com>2013-12-17 19:19:41 +0100
commit9a839d706291fdd57aeb48c3f64654afbd144a83 (patch)
tree1f3701eedc3b03920747f3833e08c93f545b3fa1 /src/dotty/tools/dotc/typer/Namer.scala
parentc1c933d6f936a7975ca316c69d7639145eed36e7 (diff)
downloaddotty-9a839d706291fdd57aeb48c3f64654afbd144a83.tar.gz
dotty-9a839d706291fdd57aeb48c3f64654afbd144a83.tar.bz2
dotty-9a839d706291fdd57aeb48c3f64654afbd144a83.zip
Three bugfixes to typing.
Diffstat (limited to 'src/dotty/tools/dotc/typer/Namer.scala')
-rw-r--r--src/dotty/tools/dotc/typer/Namer.scala8
1 files changed, 4 insertions, 4 deletions
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