From 145902b17069d1b76a58c96985a5ed89fb1506f6 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Sat, 14 Jul 2007 13:26:40 +0000 Subject: fixed last checkin which broke 3 tests --- src/compiler/scala/tools/nsc/typechecker/Namers.scala | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/compiler/scala/tools/nsc/typechecker/Namers.scala b/src/compiler/scala/tools/nsc/typechecker/Namers.scala index 79fa6571b5..c5c6326806 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Namers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Namers.scala @@ -392,7 +392,9 @@ trait Namers { self: Analyzer => def selfTypeCompleter(tree: Tree) = new TypeCompleter(tree) { override def complete(sym: Symbol) { - var selftpe = glb(List(typer.typedType(tree).tpe, sym.owner.tpe)) + var selftpe = typer.typedType(tree).tpe + if (!(selftpe.typeSymbol isNonBottomSubClass sym.owner)) + selftpe = intersectionType(List(selftpe, sym.owner.tpe)) // println("completing self of "+sym.owner+": "+selftpe) sym.setInfo(selftpe) } -- cgit v1.2.3