mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 08:14:09 -08:00
Fix boxing lambda return value
This commit is contained in:
parent
d674b0b7de
commit
7511eea1cb
|
@ -174,7 +174,7 @@ public class LambdaMetafactorySubstitutor implements BootstrapMethodSubstitutor
|
||||||
return arg;
|
return arg;
|
||||||
}
|
}
|
||||||
arg = tryConvertArgument(arg, from, ValueType.primitive(toType));
|
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) {
|
} else if (from instanceof ValueType.Object && to instanceof ValueType.Primitive) {
|
||||||
String primitiveClass = ((ValueType.Object) from).getClassName();
|
String primitiveClass = ((ValueType.Object) from).getClassName();
|
||||||
PrimitiveType fromType = getWrappedPrimitive(primitiveClass);
|
PrimitiveType fromType = getWrappedPrimitive(primitiveClass);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user