aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/Inferencing.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/Inferencing.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/Inferencing.scala')
-rw-r--r--src/dotty/tools/dotc/typer/Inferencing.scala8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/dotty/tools/dotc/typer/Inferencing.scala b/src/dotty/tools/dotc/typer/Inferencing.scala
index 418bf44d1..1d1220824 100644
--- a/src/dotty/tools/dotc/typer/Inferencing.scala
+++ b/src/dotty/tools/dotc/typer/Inferencing.scala
@@ -233,17 +233,17 @@ object Inferencing {
if (!tp.isStable) ctx.error(i"Prefix of type ${tp.widenIfUnstable} is not stable", pos)
/** Check that `tp` is a class type with a stable prefix.
- * @return Underlying class symbol if type checks out OK, ObjectClass if not.
+ * @return Underlying class type if type checks out OK, ObjectClass.typeRef if not.
*/
- def checkClassTypeWithStablePrefix(tp: Type, pos: Position)(implicit ctx: Context): ClassSymbol = tp.dealias match {
+ def checkClassTypeWithStablePrefix(tp: Type, pos: Position)(implicit ctx: Context): Type = tp.dealias match {
case tp: TypeRef if tp.symbol.isClass =>
checkStable(tp.prefix, pos)
- tp.symbol.asClass
+ tp
case _: TypeVar | _: AnnotatedType =>
checkClassTypeWithStablePrefix(tp.asInstanceOf[TypeProxy].underlying, pos)
case _ =>
ctx.error(i"$tp is not a class type", pos)
- defn.ObjectClass
+ defn.ObjectClass.typeRef
}
/** Check that class does not define */