diff options
Diffstat (limited to 'src/compiler/scala/tools/nsc/backend/icode/GenICode.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/backend/icode/GenICode.scala | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala b/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala index 78ae4d6cb0..b1e2912e33 100644 --- a/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala +++ b/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala @@ -647,9 +647,8 @@ abstract class GenICode extends SubComponent { if (settings.debug.value) log("UNBOX : " + fun.symbol.fullNameString) val ctx1 = genLoad(expr, ctx, toTypeKind(expr.tpe)) - val boxType = fun.symbol.owner.linkedClassOfClass.tpe - ctx1.bb.emit(UNBOX(boxType), expr.pos) - generatedType = toTypeKind(boxType) + assert(expectedType.isValueType) + ctx1.bb.emit(UNBOX(expectedType.toType), expr.pos) ctx1 case Apply(fun, args) => |