- Removed method SymbolTablePrinter.getSymbolFullName

- Removed method SymbolTablePrinter.printSymbolFullName
- Replaced method SymbolTablePrinter.printSymbol by method
  SymbolTablePrinter.printSymbolKindAndName


git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@2673 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
This commit is contained in:
paltherr 2004-02-29 14:07:12 +00:00
parent 11f9c70c37
commit d5bca9b88c
8 changed files with 16 additions and 38 deletions

View File

@ -515,14 +515,6 @@ public abstract class Global {
}
return string;
}
public String getSymbolFullName(Symbol symbol) {
String string = super.getSymbolFullName(symbol);
if (!debug) {
int index = string.indexOf('$');
if (index > 0) string = string.substring(0, index);
}
return string;
}
}
// !!! >>> Interpreter stuff

View File

@ -1110,7 +1110,7 @@ public abstract class Symbol implements Modifiers, Kinds {
* e.g., "class Foo", "function Bar".
*/
public String toString() {
return new SymbolTablePrinter().printSymbol(this).toString();
return new SymbolTablePrinter().printSymbolKindAndName(this).toString();
}
/** String representation of location.

View File

@ -303,13 +303,6 @@ public class SymbolTablePrinter {
return name;
}
/** Returns the full name of the given symbol. */
public String getSymbolFullName(Symbol symbol) {
String name = symbol.fullName().toString();
if (!global.debug) name = NameTransformer.decode(name);
return name;
}
/** Returns the inner string of the given symbol. */
public String getSymbolInnerString(Symbol symbol) {
switch (symbol.kind) {
@ -335,11 +328,16 @@ public class SymbolTablePrinter {
return printSymbolUniqueId(symbol);
}
/** Prints the full name of the given symbol */
public SymbolTablePrinter printSymbolFullName(Symbol symbol) {
print(getSymbolFullName(symbol));
//print("{" + symbol.owner() + "}");//DEBUG
return printSymbolUniqueId(symbol);
/** Prints the kind and the name of the given symbol. */
public SymbolTablePrinter printSymbolKindAndName(Symbol symbol) {
if (symbol.isAnonymousClass()) {
print("<template>");
return printSymbolUniqueId(symbol);
} else {
String kind = getSymbolKind(symbol);
if (kind != null) print(kind).space();
return printSymbolName(symbol);
}
}
/** Prints the type of the given symbol with the given inner string. */
@ -359,18 +357,6 @@ public class SymbolTablePrinter {
return this;
}
/** Prints the given symbol. */
public SymbolTablePrinter printSymbol(Symbol symbol) {
if (symbol.isAnonymousClass()) {
print("<template>");
return printSymbolUniqueId(symbol);
} else {
String kind = getSymbolKind(symbol);
if (kind != null) print(kind).space();
return printSymbolFullName(symbol);
}
}
/** Prints the signature of the given symbol. */
public SymbolTablePrinter printSignature(Symbol symbol) {
String keyword = getSymbolKeyword(symbol);

View File

@ -592,7 +592,7 @@ public class Erasure extends GenTransformer implements Modifiers {
SymbolTablePrinter printer = new SymbolTablePrinter(" ");
printer.print("overlapping overloaded alternatives;").space();
printer.print("the two following alternatives of").space();
printer.printSymbol(symbol1).space();
printer.printSymbolKindAndName(symbol1).space();
printer.print("have the same erasure:").space();
printer.printType(symbol1.nextType());
Phase phase = global.currentPhase;

View File

@ -1,4 +1,4 @@
S7.scala:6: illegal cyclic reference involving class S7.A
S7.scala:6: illegal cyclic reference involving class A
class C() extends a.A() {}
^
one error found

View File

@ -1,4 +1,4 @@
bug228.scala:11: constructor java.lang.reflect.AccessibleObject cannot be accessed in Foo
bug228.scala:11: constructor AccessibleObject cannot be accessed in Foo
val o = new AccessibleObject;
^
one error found

View File

@ -1,4 +1,4 @@
bug72.scala:5: object scala.collection.mutable.Set of type scala.collection.mutable.Set cannot be applied to (java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String) with expected result type scala.collection.mutable.Set[java.lang.String]
bug72.scala:5: object Set of type scala.collection.mutable.Set cannot be applied to (java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String) with expected result type scala.collection.mutable.Set[java.lang.String]
val weekDays : Set[String] = Set("Mon", "Tue", "Wed", "Thu", "Fri");
^
one error found

View File

@ -1,4 +1,4 @@
bug97.scala:3: expected pattern type scala.Any does not conform to sequence trait scala.List
bug97.scala:3: expected pattern type scala.Any does not conform to sequence trait List
case List(y) => "zero"
^
one error found