Add cast to expected type in call-based in-expression generation

#KT-20106 Fixed
This commit is contained in:
Dmitry Petrov
2017-09-05 11:42:03 +03:00
parent 081b732070
commit 21cdf9dd5b
6 changed files with 32 additions and 0 deletions
@@ -39,6 +39,7 @@ class CallBasedInExpressionGenerator(
object : BranchedValue(argument, null, argument.type, Opcodes.IFEQ) {
override fun putSelector(type: Type, v: InstructionAdapter) {
invokeFunction(v)
coerceTo(type, v)
}
override fun condJump(jumpLabel: Label, v: InstructionAdapter, jumpIfFalse: Boolean) {