summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschinz <schinz@epfl.ch>2003-06-27 09:08:14 +0000
committerschinz <schinz@epfl.ch>2003-06-27 09:08:14 +0000
commit06a671299ac138314b02820a253a1e83b4111530 (patch)
treea9e16923cc6842b58fc17fe75cc2fbc839b70fc7
parent0145ce34b58566a39862f91e72865fbec3639cb1 (diff)
downloadscala-06a671299ac138314b02820a253a1e83b4111530.tar.gz
scala-06a671299ac138314b02820a253a1e83b4111530.tar.bz2
scala-06a671299ac138314b02820a253a1e83b4111530.zip
- bug fix: substitute ThisTypes when importing ...
- bug fix: substitute ThisTypes when importing mixins
-rw-r--r--sources/scalac/transformer/ExpandMixins.java11
1 files changed, 8 insertions, 3 deletions
diff --git a/sources/scalac/transformer/ExpandMixins.java b/sources/scalac/transformer/ExpandMixins.java
index 699a970c1f..d0f4c6510f 100644
--- a/sources/scalac/transformer/ExpandMixins.java
+++ b/sources/scalac/transformer/ExpandMixins.java
@@ -25,9 +25,12 @@ import Tree.*;
* @version 1.0
*/
-// [...] do not copy hidden members which are not accessible via
-// "super"
-// [...] handle overloaded symbols
+// TODO do not copy hidden members which are not accessible via
+// "super".
+
+// TODO also substitute type parameters of classes in which the mixin
+// is nested, if any. Do the same for the substitution of symbols in
+// ThisTypes.
public class ExpandMixins extends Transformer {
// Mapping from (class) symbols to their definition.
@@ -249,6 +252,7 @@ public class ExpandMixins extends Transformer {
}
// Pass 2: copy members
+ treeCopier.pushThisTypeSubst(bcSym, owner);
for (int m = 0; m < mixinBody.length; ++m) {
Tree member = mixinBody[m];
@@ -272,6 +276,7 @@ public class ExpandMixins extends Transformer {
mixedInSymbols.put(member.symbol(), newMember.symbol());
}
}
+ treeCopier.popThisTypeSubst();
}
// Modify mixin base classes to refer to interfaces instead of