summaryrefslogtreecommitdiff
path: root/sources/scalac/ast
diff options
context:
space:
mode:
authorpaltherr <paltherr@epfl.ch>2003-12-01 10:21:21 +0000
committerpaltherr <paltherr@epfl.ch>2003-12-01 10:21:21 +0000
commited0a728933064567fc9db1712b78a2fe2a5db073 (patch)
tree1d6f241a2898494844f2ed63b7b5bc7192471f74 /sources/scalac/ast
parent44f38bde65961d019bb70d7f969dee66c9248b27 (diff)
downloadscala-ed0a728933064567fc9db1712b78a2fe2a5db073.tar.gz
scala-ed0a728933064567fc9db1712b78a2fe2a5db073.tar.bz2
scala-ed0a728933064567fc9db1712b78a2fe2a5db073.zip
- Added some code to avoid printing bounds like...
- Added some code to avoid printing bounds like <: Any and >: All
Diffstat (limited to 'sources/scalac/ast')
-rw-r--r--sources/scalac/ast/printer/TextTreePrinter.java13
1 files changed, 9 insertions, 4 deletions
diff --git a/sources/scalac/ast/printer/TextTreePrinter.java b/sources/scalac/ast/printer/TextTreePrinter.java
index f4aa3cc6ff..9e71518f23 100644
--- a/sources/scalac/ast/printer/TextTreePrinter.java
+++ b/sources/scalac/ast/printer/TextTreePrinter.java
@@ -808,10 +808,15 @@ public class TextTreePrinter implements TreePrinter {
}
protected void printBounds(Tree lobound, Tree hibound) {
- if (!"scala.All".equals(lobound.toString()))
- printOpt(TXT_SUPERTYPE, lobound, true);
- if (!"scala.Any".equals(hibound.toString()))
- printOpt(TXT_SUBTYPE, hibound, true);
+ Definitions definitions = Global.instance.definitions;
+ boolean printLoBound = lobound.type != null
+ ? lobound.type().symbol() != definitions.ALL_CLASS
+ : !"scala.All".equals(lobound.toString());
+ if (printLoBound) printOpt(TXT_SUPERTYPE, lobound, true);
+ boolean printHiBound = hibound.type != null
+ ? hibound.type().symbol() != definitions.ANY_CLASS
+ : !"scala.Any".equals(hibound.toString());
+ if (printHiBound) printOpt(TXT_SUBTYPE, hibound, true);
}
}