diff options
Diffstat (limited to 'sources/scalac')
-rw-r--r-- | sources/scalac/symtab/Symbol.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sources/scalac/symtab/Symbol.java b/sources/scalac/symtab/Symbol.java index 93573a2635..962c332266 100644 --- a/sources/scalac/symtab/Symbol.java +++ b/sources/scalac/symtab/Symbol.java @@ -282,6 +282,14 @@ public abstract class Symbol implements Modifiers, Kinds { return owner.isPackage() && pos == Position.NOPOS; } + /** Is this symbol an overloaded symbol? */ + public boolean isOverloaded() { + switch (info()) { + case OverloadedType(_,_): return true; + default : return false; + } + } + // Symbol names ---------------------------------------------------------------- /** Get the fully qualified name of this Symbol @@ -383,6 +391,12 @@ public abstract class Symbol implements Modifiers, Kinds { return info().members(); } + /** Lookup symbol with given name; return Symbol.NONE if not found. + */ + public Symbol lookup(Name name) { + return info().lookup(name); + } + // Symbol types -------------------------------------------------------------- /** Was symbol's type updated during phase `id'? |