Fix boxing lambda return value

This commit is contained in:
Alexey Andreev 2018-06-28 19:07:29 +03:00
parent d674b0b7de
commit 7511eea1cb

View File

@ -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);