Fix bug in LambdaMetafactory

This commit is contained in:
Alexey Andreev 2017-11-19 19:46:01 +03:00
parent fc4425d7f4
commit 2fb6ca7001

View File

@ -87,9 +87,9 @@ public class LambdaMetafactorySubstitutor implements BootstrapMethodSubstitutor
}
ValueEmitter result = invoke(pe, implMethod, passedArguments);
if (result != null) {
ValueType expectedResult = instantiatedMethodType[instantiatedMethodType.length - 1];
if (result != null && expectedResult != ValueType.VOID) {
ValueType actualResult = implementorSignature[implementorSignature.length - 1];
ValueType expectedResult = instantiatedMethodType[instantiatedMethodType.length - 1];
tryConvertArgument(result, actualResult, expectedResult).returnValue();
} else {
pe.exit();