allow putting an Invert operation on stack as a void type (KT-1634)
This commit is contained in:
@@ -511,6 +511,10 @@ public abstract class StackValue {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void put(Type type, InstructionAdapter v) {
|
public void put(Type type, InstructionAdapter v) {
|
||||||
|
if (type == Type.VOID_TYPE) {
|
||||||
|
myOperand.put(type, v); // the operand will remove itself from the stack if needed
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (type != Type.BOOLEAN_TYPE) {
|
if (type != Type.BOOLEAN_TYPE) {
|
||||||
throw new UnsupportedOperationException("don't know how to put a compare as a non-boolean type");
|
throw new UnsupportedOperationException("don't know how to put a compare as a non-boolean type");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
fun box(): String {
|
||||||
|
!true
|
||||||
|
return "OK"
|
||||||
|
}
|
||||||
@@ -432,4 +432,8 @@ public class PrimitiveTypesTest extends CodegenTestCase {
|
|||||||
public void testKt1508 () {
|
public void testKt1508 () {
|
||||||
blackBoxFile("regressions/kt1508.kt");
|
blackBoxFile("regressions/kt1508.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void testKt1634() {
|
||||||
|
blackBoxFile("regressions/kt1634.kt");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user