summaryrefslogtreecommitdiff
path: root/sources/scalac/symtab/Symbol.java
diff options
context:
space:
mode:
authorpaltherr <paltherr@epfl.ch>2003-11-27 14:03:52 +0000
committerpaltherr <paltherr@epfl.ch>2003-11-27 14:03:52 +0000
commitcbbb75f1bdbb7b46207b3e600bf2b57cae94d36f (patch)
treec8bb4a75f3302277fbed145018c7dc6b8d2cec96 /sources/scalac/symtab/Symbol.java
parent2fd1face7f1b1c3af8b083988c7ce0ee6d31d7ed (diff)
downloadscala-cbbb75f1bdbb7b46207b3e600bf2b57cae94d36f.tar.gz
scala-cbbb75f1bdbb7b46207b3e600bf2b57cae94d36f.tar.bz2
scala-cbbb75f1bdbb7b46207b3e600bf2b57cae94d36f.zip
- Added isThisSym
- Removed NoType special case in setTypeOfThis
Diffstat (limited to 'sources/scalac/symtab/Symbol.java')
-rw-r--r--sources/scalac/symtab/Symbol.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/sources/scalac/symtab/Symbol.java b/sources/scalac/symtab/Symbol.java
index 8687fa39ba..9872e7633f 100644
--- a/sources/scalac/symtab/Symbol.java
+++ b/sources/scalac/symtab/Symbol.java
@@ -421,6 +421,11 @@ public abstract class Symbol implements Modifiers, Kinds {
return name == Names.COMPOUND_NAME.toTypeName();
}
+ /** Does this symbol denote a this symbol? */
+ public final boolean isThisSym() {
+ return owner.isClass() && owner.thisSym() == this;
+ }
+
/** Does this symbol denote an interface? */
public final boolean isInterface() {
info(); // force delayed transformInfos that may change this flag
@@ -1856,7 +1861,6 @@ public class ClassSymbol extends TypeSymbol {
}
public Symbol setTypeOfThis(Type tp) {
- if (tp == Type.NoType) { thisSym = this; return this; }
thisSym = new TermSymbol(this.pos, Names.this_, this, SYNTHETIC);
thisSym.setInfo(tp);
return this;