diff options
author | ilyas <ilyas@epfl.ch> | 2009-01-22 22:17:50 +0000 |
---|---|---|
committer | ilyas <ilyas@epfl.ch> | 2009-01-22 22:17:50 +0000 |
commit | 9ad89d940fcba9713f0fdbe84ab3f467fcb4c1bd (patch) | |
tree | 449016ae20533aa9251725039ec8f621326cb945 | |
parent | 1f83b1f07ce20c675b3df1c06e80b2f64e924554 (diff) | |
download | scala-9ad89d940fcba9713f0fdbe84ab3f467fcb4c1bd.tar.gz scala-9ad89d940fcba9713f0fdbe84ab3f467fcb4c1bd.tar.bz2 scala-9ad89d940fcba9713f0fdbe84ab3f467fcb4c1bd.zip |
scalap modified for correct object printing
-rw-r--r-- | src/compiler/scalax/rules/scalasig/ScalaSigPrinter.scala | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/compiler/scalax/rules/scalasig/ScalaSigPrinter.scala b/src/compiler/scalax/rules/scalasig/ScalaSigPrinter.scala index f85c8884a5..1c237139a0 100644 --- a/src/compiler/scalax/rules/scalasig/ScalaSigPrinter.scala +++ b/src/compiler/scalax/rules/scalasig/ScalaSigPrinter.scala @@ -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 }) |