summaryrefslogtreecommitdiff
path: root/sources
diff options
context:
space:
mode:
authorpaltherr <paltherr@epfl.ch>2003-08-02 21:45:33 +0000
committerpaltherr <paltherr@epfl.ch>2003-08-02 21:45:33 +0000
commit5a67796e029043e8263c6f10d5c1e74ce5909283 (patch)
treec2c03631547b02e07f6636b007079f694f8e9dd7 /sources
parent97b01f58e9f9e0c314ecbc7555cea3cba7a3a6d8 (diff)
downloadscala-5a67796e029043e8263c6f10d5c1e74ce5909283.tar.gz
scala-5a67796e029043e8263c6f10d5c1e74ce5909283.tar.bz2
scala-5a67796e029043e8263c6f10d5c1e74ce5909283.zip
- Changed localDummy to generate non-empty names
Diffstat (limited to 'sources')
-rw-r--r--sources/scalac/ast/TreeGen.java2
-rw-r--r--sources/scalac/util/Names.java8
2 files changed, 9 insertions, 1 deletions
diff --git a/sources/scalac/ast/TreeGen.java b/sources/scalac/ast/TreeGen.java
index 051c067b5a..137e76c6fa 100644
--- a/sources/scalac/ast/TreeGen.java
+++ b/sources/scalac/ast/TreeGen.java
@@ -73,7 +73,7 @@ public class TreeGen implements Kinds, Modifiers {
/** Create a dummy symbol to be used for templates.
*/
public Symbol localDummy(int pos, Symbol owner) {
- return new TermSymbol(pos, Names.EMPTY, owner, 0)
+ return new TermSymbol(pos, Names.LOCAL(owner), owner, 0)
.setInfo(Type.NoType);
}
diff --git a/sources/scalac/util/Names.java b/sources/scalac/util/Names.java
index 069fafbbad..8d1ae3964c 100644
--- a/sources/scalac/util/Names.java
+++ b/sources/scalac/util/Names.java
@@ -7,8 +7,16 @@
\* */
package scalac.util;
+import scalac.symtab.Symbol;
+
public class Names {
+ private static final Name LOCAL_PREFIX = Name.fromString("local$");
+
+ public static Name LOCAL(Symbol clasz) {
+ return LOCAL_PREFIX.append(clasz.name);
+ }
+
public static final Name ERROR = Name.ERROR;
public static final Name NOSYMBOL = Name.fromString("<none>");
public static final Name EMPTY = Name.fromString("");