diff options
author | schinz <schinz@epfl.ch> | 2005-04-03 07:52:46 +0000 |
---|---|---|
committer | schinz <schinz@epfl.ch> | 2005-04-03 07:52:46 +0000 |
commit | a29d908bb3655a0d6e3976d2ddff8b68d0946737 (patch) | |
tree | 509ea047851bdfe06265776558aa17ae4dc9d1d4 | |
parent | 8cefd2b4b31fd45deba92397d7f59b9b6de423fe (diff) | |
download | scala-a29d908bb3655a0d6e3976d2ddff8b68d0946737.tar.gz scala-a29d908bb3655a0d6e3976d2ddff8b68d0946737.tar.bz2 scala-a29d908bb3655a0d6e3976d2ddff8b68d0946737.zip |
- do not mix in static members
-rw-r--r-- | sources/scalac/transformer/ExpandMixinsPhase.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sources/scalac/transformer/ExpandMixinsPhase.java b/sources/scalac/transformer/ExpandMixinsPhase.java index 0a6c53fdfa..969080039a 100644 --- a/sources/scalac/transformer/ExpandMixinsPhase.java +++ b/sources/scalac/transformer/ExpandMixinsPhase.java @@ -191,9 +191,14 @@ public class ExpandMixinsPhase extends Phase { } public Tree transform(Tree tree) { switch (tree) { + case ValDef(_, _, _, _): + if (tree.symbol().hasStaticAttribute()) + return Tree.Empty; + break; case DefDef(_, _, _, _, _, _): Symbol symbol = getSymbolFor(tree); - if (symbol.owner() != clasz) return Tree.Empty; + if (symbol.owner() != clasz || symbol.hasStaticAttribute()) + return Tree.Empty; if (symbol.isInitializer()) initializer = true; tree = super.transform(tree); initializer = false; |