Coerce last value of delegated expression for inline classes

Note that this commit doesn't fix case when some inline class over
 `Any` is returned from a lambda, it'll be fixed further as part of the
 #KT-27586

 #KT-27737 Fixed
This commit is contained in:
Mikhail Zarechenskiy
2018-10-22 03:52:10 +03:00
parent a97867ccb8
commit 79159947a5
7 changed files with 83 additions and 1 deletions
@@ -620,7 +620,8 @@ public class PropertyCodegen {
assert delegate != null : "No delegate for delegated property: " + propertyDescriptor;
StackValue lastValue = invokeDelegatedPropertyConventionMethod(codegen, resolvedCall, delegate, propertyDescriptor);
Type asmType = signature.getReturnType();
lastValue.put(asmType, v);
KotlinType kotlinReturnType = propertyAccessorDescriptor.getOriginal().getReturnType();
lastValue.put(asmType, kotlinReturnType, v);
v.areturn(asmType);
}
}