diff options
author | Lukas Rytz <lukas.rytz@typesafe.com> | 2016-04-20 14:54:32 +0200 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@typesafe.com> | 2016-04-20 14:54:32 +0200 |
commit | 2ec7e7970aea01d86aa2faa4a9d7753ac505c68e (patch) | |
tree | 021e96b5b9d9df83a9eaf1877465686380dd03f7 /src/compiler | |
parent | 4f2a20e843c0f07352dff87767cad13636942a3e (diff) | |
parent | c600c15488b97e7b1f72e6b7811f53f03a493c1c (diff) | |
download | scala-2ec7e7970aea01d86aa2faa4a9d7753ac505c68e.tar.gz scala-2ec7e7970aea01d86aa2faa4a9d7753ac505c68e.tar.bz2 scala-2ec7e7970aea01d86aa2faa4a9d7753ac505c68e.zip |
Merge pull request #5100 from lrytz/unitBox
SI-6710 / PR 5072 follow-up: fix Unit.box / Unit.unbox
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/scala/tools/nsc/backend/jvm/BCodeBodyBuilder.scala | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/nsc/backend/jvm/BCodeBodyBuilder.scala b/src/compiler/scala/tools/nsc/backend/jvm/BCodeBodyBuilder.scala index 6d3d458324..cea264c57a 100644 --- a/src/compiler/scala/tools/nsc/backend/jvm/BCodeBodyBuilder.scala +++ b/src/compiler/scala/tools/nsc/backend/jvm/BCodeBodyBuilder.scala @@ -658,16 +658,16 @@ abstract class BCodeBodyBuilder extends BCodeSkelBuilder { genInvokeDynamicLambda(attachment.target, attachment.arity, attachment.functionalInterface, attachment.sam) generatedType = methodBTypeFromSymbol(fun.symbol).returnType - case Apply(fun @ _, List(expr)) if currentRun.runDefinitions.isBox(fun.symbol) => + case Apply(fun, List(expr)) if currentRun.runDefinitions.isBox(fun.symbol) => val nativeKind = tpeTK(expr) genLoad(expr, nativeKind) val MethodNameAndType(mname, methodType) = srBoxesRuntimeBoxToMethods(nativeKind) bc.invokestatic(srBoxesRunTimeRef.internalName, mname, methodType.descriptor, app.pos) - generatedType = boxResultType(fun.symbol) // was typeToBType(fun.symbol.tpe.resultType) + generatedType = boxResultType(fun.symbol) - case Apply(fun @ _, List(expr)) if currentRun.runDefinitions.isUnbox(fun.symbol) => + case Apply(fun, List(expr)) if currentRun.runDefinitions.isUnbox(fun.symbol) => genLoad(expr) - val boxType = unboxResultType(fun.symbol) // was typeToBType(fun.symbol.owner.linkedClassOfClass.tpe) + val boxType = unboxResultType(fun.symbol) generatedType = boxType val MethodNameAndType(mname, methodType) = srBoxesRuntimeUnboxToMethods(boxType) bc.invokestatic(srBoxesRunTimeRef.internalName, mname, methodType.descriptor, app.pos) |