summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLukas Rytz <lukas.rytz@epfl.ch>2010-01-14 08:43:51 +0000
committerLukas Rytz <lukas.rytz@epfl.ch>2010-01-14 08:43:51 +0000
commit19bf31545fba923c38f60d134276895049838165 (patch)
tree103f641fe21369b9f21f1375bd50c59285358ec4 /src
parent763be33feae8be5b026700189caa21f0e255b8f7 (diff)
downloadscala-19bf31545fba923c38f60d134276895049838165.tar.gz
scala-19bf31545fba923c38f60d134276895049838165.tar.bz2
scala-19bf31545fba923c38f60d134276895049838165.zip
fix for .net compiler (flatten is skipped).
Diffstat (limited to 'src')
-rw-r--r--src/compiler/scala/tools/nsc/backend/icode/GenICode.scala9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala b/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala
index 23b75e1142..2f66f672d8 100644
--- a/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala
+++ b/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala
@@ -1410,7 +1410,14 @@ abstract class GenICode extends SubComponent {
assert(ctx.clazz.symbol eq cls,
"Classes are not the same: " + ctx.clazz.symbol + ", " + cls)
- for (f <- cls.info.decls ; if !f.isMethod && f.isTerm)
+ /** Non-method term members are fields, except for moudle members. Module
+ * members can only happen on .NET (no flatten) for inner traits. There,
+ * a module symbol is generated (transformInfo in mixin) which is used
+ * as owner for the members of the implementation class (so that the
+ * backend emits them as static).
+ * No code is needed for this module symbol.
+ */
+ for (f <- cls.info.decls ; if !f.isMethod && f.isTerm && !f.isModule)
ctx.clazz addField new IField(f)
}