summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIulian Dragos <jaguarul@gmail.com>2007-04-20 14:54:29 +0000
committerIulian Dragos <jaguarul@gmail.com>2007-04-20 14:54:29 +0000
commit5c8a5ba86a18d6587a6244153e871df260602416 (patch)
tree18d2e3d7c51455cf0bed2ab952ad5937dfba509f /src
parentd6969c4b5d161ec8018006e3814b6666a58aebe3 (diff)
downloadscala-5c8a5ba86a18d6587a6244153e871df260602416.tar.gz
scala-5c8a5ba86a18d6587a6244153e871df260602416.tar.bz2
scala-5c8a5ba86a18d6587a6244153e871df260602416.zip
Fixed crash for UNBOX with expected type UNIT.
Diffstat (limited to 'src')
-rw-r--r--src/compiler/scala/tools/nsc/backend/icode/GenICode.scala3
1 files changed, 2 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 e223ab112a..3dab1034a8 100644
--- a/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala
+++ b/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala
@@ -666,7 +666,8 @@ abstract class GenICode extends SubComponent {
log("UNBOX : " + fun.symbol.fullNameString)
val ctx1 = genLoad(expr, ctx, toTypeKind(expr.tpe))
assert(expectedType.isValueType)
- ctx1.bb.emit(UNBOX(expectedType), expr.pos)
+ generatedType = toTypeKind(fun.symbol.owner.linkedClassOfClass.tpe)
+ ctx1.bb.emit(UNBOX(generatedType), expr.pos)
ctx1
case Apply(fun, args) =>