diff options
Diffstat (limited to 'sources')
-rw-r--r-- | sources/scalac/transformer/AddInterfaces.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sources/scalac/transformer/AddInterfaces.java b/sources/scalac/transformer/AddInterfaces.java index e841d1a60c..497b7a4feb 100644 --- a/sources/scalac/transformer/AddInterfaces.java +++ b/sources/scalac/transformer/AddInterfaces.java @@ -159,6 +159,12 @@ class AddInterfaces extends Transformer { return gen.This(tree.pos, classThisSym); } + case Super(_, _): { + // Use class symbol for references to "super". + Symbol classSuperSym = phase.getClassSymbol(tree.symbol()); + return gen.Super(tree.pos, classSuperSym); + } + case Select(Super(_, _), _): { // Use class member symbols for references to "super". @@ -166,8 +172,9 @@ class AddInterfaces extends Transformer { Symbol classOwner = phase.getClassSymbol(sym.owner()); Map ownerMemberMap = phase.getClassMemberMap(classOwner); if (ownerMemberMap != null && ownerMemberMap.containsKey(sym)) { + Tree qualifier = transform(((Select)tree).qualifier); Symbol newSym = (Symbol)ownerMemberMap.get(sym); - return gen.Select(((Select)tree).qualifier, newSym); + return gen.Select(tree.pos, qualifier, newSym); } else return super.transform(tree); } |