diff options
Diffstat (limited to 'sources/scalac/symtab/Symbol.java')
-rw-r--r-- | sources/scalac/symtab/Symbol.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sources/scalac/symtab/Symbol.java b/sources/scalac/symtab/Symbol.java index b23b36e09a..69b3053de3 100644 --- a/sources/scalac/symtab/Symbol.java +++ b/sources/scalac/symtab/Symbol.java @@ -75,6 +75,13 @@ public abstract class Symbol implements Modifiers, Kinds { */ public abstract Symbol cloneSymbol(); + /** Return a fresh symbol with the same fields as this one and the + * given owner. + */ + public Symbol cloneSymbol(Symbol owner) { + return cloneSymbol().setOwner(owner); + } + /** copy all fields to `sym' */ public void copyTo(Symbol sym) { |