diff options
author | schinz <schinz@epfl.ch> | 2003-05-19 11:09:34 +0000 |
---|---|---|
committer | schinz <schinz@epfl.ch> | 2003-05-19 11:09:34 +0000 |
commit | 2300aac76adab6945ca2d2e3cb15320621a76150 (patch) | |
tree | a6ddb7cd93b328751822f596250da009a9a00a27 /sources/scalac/transformer/AddInterfaces.java | |
parent | 969e41ca39c84fea500d4284b7b1d56e84e2d611 (diff) | |
download | scala-2300aac76adab6945ca2d2e3cb15320621a76150.tar.gz scala-2300aac76adab6945ca2d2e3cb15320621a76150.tar.bz2 scala-2300aac76adab6945ca2d2e3cb15320621a76150.zip |
- (final) bug fix: use the symbol of the class ...
- (final) bug fix: use the symbol of the class for ThisTypes which
appear its body.
Diffstat (limited to 'sources/scalac/transformer/AddInterfaces.java')
-rw-r--r-- | sources/scalac/transformer/AddInterfaces.java | 11 |
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) { |