diff options
author | mihaylov <mihaylov@epfl.ch> | 2005-07-01 11:00:23 +0000 |
---|---|---|
committer | mihaylov <mihaylov@epfl.ch> | 2005-07-01 11:00:23 +0000 |
commit | ed607f9e0045285ac104e336231092c0be4e132c (patch) | |
tree | 7815b179110b4314813e66fb958e1acb742c9f4d /sources | |
parent | 6e9b46d532ecf8f7804193f92220f967ee846f73 (diff) | |
download | scala-ed607f9e0045285ac104e336231092c0be4e132c.tar.gz scala-ed607f9e0045285ac104e336231092c0be4e132c.tar.bz2 scala-ed607f9e0045285ac104e336231092c0be4e132c.zip |
Fixed the printing of lower bounds.
Diffstat (limited to 'sources')
-rw-r--r-- | sources/scala/tools/scaladoc/SymbolTablePrinter.java | 2 | ||||
-rw-r--r-- | sources/scala/tools/scaladoc/SymbolTablePrinterFactory.java | 2 | ||||
-rw-r--r-- | sources/scalac/symtab/SymbolTablePrinter.java | 28 |
3 files changed, 15 insertions, 17 deletions
diff --git a/sources/scala/tools/scaladoc/SymbolTablePrinter.java b/sources/scala/tools/scaladoc/SymbolTablePrinter.java index eb3c7991af..cfce384d9d 100644 --- a/sources/scala/tools/scaladoc/SymbolTablePrinter.java +++ b/sources/scala/tools/scaladoc/SymbolTablePrinter.java @@ -157,7 +157,7 @@ public abstract class MySymbolTablePrinter extends SymbolTablePrinter { else if (symbol.variance() < 0) print("-"); printSymbol(symbol, addLink); - return printType(symbol.loBound(), ">:"); + return printType(symbol.loBound(), " >: "); } /** diff --git a/sources/scala/tools/scaladoc/SymbolTablePrinterFactory.java b/sources/scala/tools/scaladoc/SymbolTablePrinterFactory.java index 18b2e23915..c00dc1db77 100644 --- a/sources/scala/tools/scaladoc/SymbolTablePrinterFactory.java +++ b/sources/scala/tools/scaladoc/SymbolTablePrinterFactory.java @@ -72,7 +72,7 @@ class SymbolTablePrinterFactory { public SymbolTablePrinter printType(Type type, String inner) { if ((INNER_LT.equals(inner) && type.symbol() == global.definitions.ANY_CLASS) || - (">:".equals(inner) && type.symbol() == global.definitions.ALL_CLASS)) + (" >: ".equals(inner) && type.symbol() == global.definitions.ALL_CLASS)) return this; else { printType0(getTypeToPrintForType(type), inner); diff --git a/sources/scalac/symtab/SymbolTablePrinter.java b/sources/scalac/symtab/SymbolTablePrinter.java index bee6cafe89..ad6fdbf1cd 100644 --- a/sources/scalac/symtab/SymbolTablePrinter.java +++ b/sources/scalac/symtab/SymbolTablePrinter.java @@ -307,12 +307,12 @@ public class SymbolTablePrinter { /** Returns the inner string of the given symbol. */ public String getSymbolInnerString(Symbol symbol) { switch (symbol.kind) { - case Kinds.NONE : return ":"; - case Kinds.ALIAS: return "="; - case Kinds.CLASS: return "extends"; - case Kinds.TYPE : return "<:"; - case Kinds.VAL : return symbol.isModule() ? "extends" : - symbol.isDefParameter() ? ": =>" : ":"; + case Kinds.NONE : return ": "; + case Kinds.ALIAS: return " = "; + case Kinds.CLASS: return " extends "; + case Kinds.TYPE : return " <: "; + case Kinds.VAL : return symbol.isModule() ? " extends " : + symbol.isDefParameter() ? ": => " : ": "; default : throw Debug.abort("unknown kind " + symbol.kind); } } @@ -364,7 +364,7 @@ public class SymbolTablePrinter { if (keyword != null) print(keyword).space(); String inner = getSymbolInnerString(symbol); return printSymbolName(symbol) - .printType(symbol.loBound(), ">:") + .printType(symbol.loBound(), " >: ") .printSymbolType(symbol, inner); } @@ -385,7 +385,7 @@ public class SymbolTablePrinter { for (int i = 0; i < vparams.length; i++) { if (i > 0) print(","); printSymbolType(vparams[i], - vparams[i].isDefParameter() ? "=>" : null); + vparams[i].isDefParameter() ? "=> " : ""); } return print(')'); } @@ -454,8 +454,8 @@ public class SymbolTablePrinter { /** Prints the given type with the given inner string. */ public SymbolTablePrinter printType(Type type, String inner) { - if ("<:".equals(inner) && type.symbol() == global.definitions.ANY_CLASS || - ">:".equals(inner) && type.symbol() == global.definitions.ALL_CLASS) + if (" <: ".equals(inner) && type.symbol() == global.definitions.ANY_CLASS || + " >: ".equals(inner) && type.symbol() == global.definitions.ALL_CLASS) return this; else return printType0(getTypeToPrintForType(type), inner); @@ -468,9 +468,7 @@ public class SymbolTablePrinter { case MethodType(Symbol[] vparams, Type result): return printValueParams(vparams).printType(result, inner); default: - if (inner != null) { - print(inner).space(); - } + print(inner); return printType0(type); } } @@ -525,9 +523,9 @@ public class SymbolTablePrinter { .printScope(members,true) .printSymbolUniqueId(type.symbol()); case MethodType(_, _): - return printType0(type, null); + return printType0(type, "" /*null*/); case PolyType(_, _): - return printType0(type, null); + return printType0(type, "" /*null*/); case OverloadedType(Symbol[] alts, Type[] alttypes): return printTypes(alttypes, " <and> "); case TypeVar(Type origin, Constraint constr): |