From 7511eea1cbaa648892b8b21d7c51a7563873138b Mon Sep 17 00:00:00 2001 From: Alexey Andreev Date: Thu, 28 Jun 2018 19:07:29 +0300 Subject: [PATCH] Fix boxing lambda return value --- .../classlib/impl/lambda/LambdaMetafactorySubstitutor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classlib/src/main/java/org/teavm/classlib/impl/lambda/LambdaMetafactorySubstitutor.java b/classlib/src/main/java/org/teavm/classlib/impl/lambda/LambdaMetafactorySubstitutor.java index e7d422e1b..a1dbbd0af 100644 --- a/classlib/src/main/java/org/teavm/classlib/impl/lambda/LambdaMetafactorySubstitutor.java +++ b/classlib/src/main/java/org/teavm/classlib/impl/lambda/LambdaMetafactorySubstitutor.java @@ -174,7 +174,7 @@ public class LambdaMetafactorySubstitutor implements BootstrapMethodSubstitutor return arg; } arg = tryConvertArgument(arg, from, ValueType.primitive(toType)); - return arg.getProgramEmitter().invoke(primitiveClass, "valueOf", ValueType.primitive(toType), arg); + return arg.getProgramEmitter().invoke(primitiveClass, "valueOf", to, arg); } else if (from instanceof ValueType.Object && to instanceof ValueType.Primitive) { String primitiveClass = ((ValueType.Object) from).getClassName(); PrimitiveType fromType = getWrappedPrimitive(primitiveClass);