Fixed bug1049

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@12315 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
This commit is contained in:
odersky 2007-07-14 11:51:42 +00:00
parent 213ca0c95a
commit c2cba68e3c
2 changed files with 6 additions and 2 deletions

View File

@ -204,7 +204,9 @@ abstract class TreePrinters {
if (self.name != nme.WILDCARD) {
print(" { "); print(self.name); printOpt(": ", self.tpt); print(" => ")
} else if (!self.tpt.isEmpty) {
print(" _ : "); print(self.tpt); print(" => ")
print(" { _ : "); print(self.tpt); print(" => ")
} else {
print(" {")
}
printColumn(body, "", ";", "}")
}

View File

@ -392,7 +392,9 @@ trait Namers { self: Analyzer =>
def selfTypeCompleter(tree: Tree) = new TypeCompleter(tree) {
override def complete(sym: Symbol) {
sym.setInfo(typer.typedType(tree).tpe)
var selftpe = glb(List(typer.typedType(tree).tpe, sym.owner.tpe))
// println("completing self of "+sym.owner+": "+selftpe)
sym.setInfo(selftpe)
}
}