summaryrefslogtreecommitdiff
path: root/sources/scalac/transformer/AddInterfaces.java
diff options
context:
space:
mode:
Diffstat (limited to 'sources/scalac/transformer/AddInterfaces.java')
-rw-r--r--sources/scalac/transformer/AddInterfaces.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/sources/scalac/transformer/AddInterfaces.java b/sources/scalac/transformer/AddInterfaces.java
index 6e16eeb351..b67774428a 100644
--- a/sources/scalac/transformer/AddInterfaces.java
+++ b/sources/scalac/transformer/AddInterfaces.java
@@ -86,11 +86,12 @@ class AddInterfaces extends Transformer {
if (ownerSubst != null && ownerSubst.fst == sym.owner())
sym.setOwner((Symbol)ownerSubst.snd);
- // Update symbol's type. TODO is this needed? Shouldn't
- // the type of the members be updated in transformInfo.
- // Here we should only be concerned by the type symbols
- // appearing in the tree, not in the type.
- //sym.updateInfo(typeMap.map(sym.info()));
+ // Update symbol's type. Do that only for symbols which do
+ // not belong to a class, since the type of these (i.e.
+ // class members) has been changed during cloning
+ // operation.
+ if (! (sym.owner().isClass() || thisTypeSubst == null))
+ sym.updateInfo(typeSubst.apply(sym.info()));
}
switch (tree) {