diff options
author | Iulian Dragos <jaguarul@gmail.com> | 2007-05-11 14:39:52 +0000 |
---|---|---|
committer | Iulian Dragos <jaguarul@gmail.com> | 2007-05-11 14:39:52 +0000 |
commit | 328e57f430a6675e2f0ef313958f19408ab40a2d (patch) | |
tree | 60734be069a56480e1004792867fe3eae397b7c9 /src | |
parent | fbb5dde4e9bbc3a29c6d0e1c73690dfbeb50419a (diff) | |
download | scala-328e57f430a6675e2f0ef313958f19408ab40a2d.tar.gz scala-328e57f430a6675e2f0ef313958f19408ab40a2d.tar.bz2 scala-328e57f430a6675e2f0ef313958f19408ab40a2d.zip |
Fixed bug #1097.
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala b/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala index 197c95d4d6..c48bfa8a09 100644 --- a/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala +++ b/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala @@ -713,13 +713,16 @@ abstract class GenJVM extends SubComponent { javaType(field)) case LOAD_MODULE(module) => - assert(module.isModule || module.isModuleClass, "Expected module: " + module) +// assert(module.isModule, "Expected module: " + module) if (settings.debug.value) log("genearting LOAD_MODULE for: " + module + " flags: " + Flags.flagsToString(module.flags)); - jcode.emitGETSTATIC(javaName(module) /* + "$" */ , - nme.MODULE_INSTANCE_FIELD.toString, - javaType(module)); + if (clasz.symbol == module.moduleClass) + jcode.emitALOAD_0() + else + jcode.emitGETSTATIC(javaName(module) /* + "$" */ , + nme.MODULE_INSTANCE_FIELD.toString, + javaType(module)); case STORE_ARRAY_ITEM(kind) => jcode.emitASTORE(javaType(kind)) |