diff options
author | Martin Odersky <odersky@gmail.com> | 2007-07-14 13:26:40 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2007-07-14 13:26:40 +0000 |
commit | 145902b17069d1b76a58c96985a5ed89fb1506f6 (patch) | |
tree | 2a16f63505f9e4be3c3457dbb5224f6fc640d2f6 /src/compiler | |
parent | 8a5b14e856a7c3944c2a47fd430c836fefdf5fb4 (diff) | |
download | scala-145902b17069d1b76a58c96985a5ed89fb1506f6.tar.gz scala-145902b17069d1b76a58c96985a5ed89fb1506f6.tar.bz2 scala-145902b17069d1b76a58c96985a5ed89fb1506f6.zip |
fixed last checkin which broke 3 tests
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Namers.scala | 4 |
1 files changed, 3 insertions, 1 deletions
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) } |