diff options
Diffstat (limited to 'sources/scalac/symtab/Symbol.java')
-rw-r--r-- | sources/scalac/symtab/Symbol.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sources/scalac/symtab/Symbol.java b/sources/scalac/symtab/Symbol.java index 6c0243853c..2336a3d90c 100644 --- a/sources/scalac/symtab/Symbol.java +++ b/sources/scalac/symtab/Symbol.java @@ -568,8 +568,9 @@ public abstract class Symbol implements Modifiers, Kinds { /** Get the simple name of this Symbol (this is always a term name) */ public Name simpleName() { - return isConstructor() ? constructorClass().name.toTermName() - : name.toTermName(); + if (isConstructor()) return constructorClass().name.toTermName(); + if (isInitializer()) return owner().name.toTermName(); + return name; } /** Get the fully qualified name of this Symbol */ |