Fix unboxing values of inline class type from type parameters

This commit is contained in:
Mikhail Zarechenskiy
2018-02-19 19:43:55 +03:00
parent 99cea07bf4
commit 530dd01ca6
9 changed files with 88 additions and 1 deletions
@@ -36,7 +36,8 @@ interface Callable {
fun isStaticCall(): Boolean
fun invokeMethodWithArguments(resolvedCall: ResolvedCall<*>, receiver: StackValue, codegen: ExpressionCodegen): StackValue {
return StackValue.functionCall(returnType, resolvedCall.resultingDescriptor.returnType) {
// it's important to use unsubstituted return type here to unbox value if it comes from type variable
return StackValue.functionCall(returnType, resolvedCall.resultingDescriptor.original.returnType) {
codegen.invokeMethodWithArguments(this, resolvedCall, receiver)
}
}