KT-10747 "Incompatible stack heights" when compiling call to Java setter with non-void return type using property syntax

#KT-10747 Fixed
This commit is contained in:
Valentin Kipyatkov
2016-01-20 20:14:58 +03:00
parent d2d0f399db
commit 3a7ed33de1
6 changed files with 55 additions and 0 deletions
@@ -1168,6 +1168,11 @@ public abstract class StackValue {
else {
coerce(topOfStackType, ArraysKt.last(setter.getParameterTypes()), v);
setter.genInvokeInstruction(v);
Type returnType = setter.getReturnType();
if (returnType != Type.VOID_TYPE) {
pop(v, returnType);
}
}
}