diff options
author | schinz <schinz@epfl.ch> | 2003-12-08 08:34:38 +0000 |
---|---|---|
committer | schinz <schinz@epfl.ch> | 2003-12-08 08:34:38 +0000 |
commit | 5137f0a3ad5d8334f793fd2dd02e955b86399f60 (patch) | |
tree | 86a78eace56e95ac9c01c3a7d71c723c833e7923 /sources/scalac | |
parent | 22b5c4c0bf52ca5df360b5832b394881e47821f8 (diff) | |
download | scala-5137f0a3ad5d8334f793fd2dd02e955b86399f60.tar.gz scala-5137f0a3ad5d8334f793fd2dd02e955b86399f60.tar.bz2 scala-5137f0a3ad5d8334f793fd2dd02e955b86399f60.zip |
- bug fix (#250): don't generate any code when ...
- bug fix (#250): don't generate any code when "null" is loaded with an
expected type of "void"
Diffstat (limited to 'sources/scalac')
-rw-r--r-- | sources/scalac/backend/jvm/GenJVM.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sources/scalac/backend/jvm/GenJVM.java b/sources/scalac/backend/jvm/GenJVM.java index 7bad4ef709..450f331ee3 100644 --- a/sources/scalac/backend/jvm/GenJVM.java +++ b/sources/scalac/backend/jvm/GenJVM.java @@ -443,7 +443,8 @@ class GenJVM { if (sym.isModule()) generatedType = genLoadModule(ctx, sym); else if (sym == defs.NULL) { - ctx.code.emitACONST_NULL(); + if (expectedType != JType.VOID) + ctx.code.emitACONST_NULL(); generatedType = expectedType; } else if (sym.owner().isClass()) { ctx.code.emitALOAD_0(); |