Properly cast right-hand side value for inline property setter

#KT-22649 Fixed
This commit is contained in:
Mikhael Bogdanov
2018-09-06 14:15:14 +02:00
parent 5cb8108eec
commit da93ff1a30
7 changed files with 46 additions and 1 deletions
@@ -1619,7 +1619,10 @@ public abstract class StackValue {
putReceiver(v, false);
}
callGenerator.processAndPutHiddenParameters(true);
callGenerator.putValueIfNeeded(new JvmKotlinType(rightSide.type, rightSide.kotlinType), rightSide);
callGenerator.putValueIfNeeded(new JvmKotlinType(
CollectionsKt.last(setter.getValueParameters()).getAsmType(),
CollectionsKt.last(setterDescriptor.getValueParameters()).getType()),
rightSide);
callGenerator.putHiddenParamsIntoLocals();
callGenerator.genCall(setter, resolvedCall, false, codegen);
}