diff options
author | schinz <schinz@epfl.ch> | 2003-11-18 15:08:09 +0000 |
---|---|---|
committer | schinz <schinz@epfl.ch> | 2003-11-18 15:08:09 +0000 |
commit | e914e7a9dec02980cb7666e997793078d0694deb (patch) | |
tree | b7da8b95c3eacd696bba8b85e5c300d54833a55f | |
parent | 67c08500803b7ff349cebda9b61a38830a793ec2 (diff) | |
download | scala-e914e7a9dec02980cb7666e997793078d0694deb.tar.gz scala-e914e7a9dec02980cb7666e997793078d0694deb.tar.bz2 scala-e914e7a9dec02980cb7666e997793078d0694deb.zip |
- delete the code of Units which were loaded on...
- delete the code of Units which were loaded only to be used as mixins.
-rw-r--r-- | sources/scalac/transformer/ExpandMixinsPhase.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sources/scalac/transformer/ExpandMixinsPhase.java b/sources/scalac/transformer/ExpandMixinsPhase.java index 0b5e34fc96..ce4be8d368 100644 --- a/sources/scalac/transformer/ExpandMixinsPhase.java +++ b/sources/scalac/transformer/ExpandMixinsPhase.java @@ -146,6 +146,13 @@ public class ExpandMixinsPhase extends Phase { public Expander(Global global) { super(global); } + public void apply(Unit unit) { + if (unit.mixinOnly) { + global.log("removing " + unit + " after mixin expansion"); + unit.body = Tree.EMPTY_ARRAY; + } else + super.apply(unit); + } public Tree transform(Tree tree) { switch (tree) { case ClassDef(_, _, _, _, _, _): |