scalap modified for correct object printing

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@16971 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
This commit is contained in:
ilyas 2009-01-22 22:17:50 +00:00
parent 068fc9717b
commit 509d404947
1 changed files with 4 additions and 5 deletions

View File

@ -19,10 +19,9 @@ class ScalaSigPrinter(stream: PrintStream) {
def indent() {for (i <- 1 to level) print(" ")}
symbol match {
case o: ObjectSymbol => indent; {
if (!isCaseClassObject(o)) {
printObject(level, o)
}
case o: ObjectSymbol => if (!isCaseClassObject(o)) {
indent
printObject(level, o)
}
case c: ClassSymbol if !refinementClass(c) && !c.isModule => indent; {
printClass(level, c)
@ -37,7 +36,7 @@ class ScalaSigPrinter(stream: PrintStream) {
def isCaseClassObject(o: ObjectSymbol): Boolean = {
val TypeRefType(prefix, classSymbol: ClassSymbol, typeArgs) = o.infoType
o.isFinal && (classSymbol.children.find(_.isCase) match {
o.isFinal && (classSymbol.children.find(x => x.isCase && x.isInstanceOf[MethodSymbol]) match {
case Some(_) => true
case None => false
})