allow putting an Invert operation on stack as a void type (KT-1634)

This commit is contained in:
Dmitry Jemerov
2012-06-02 23:05:09 +02:00
parent 58c7c7aea1
commit e1cecd10b2
3 changed files with 12 additions and 0 deletions
@@ -511,6 +511,10 @@ public abstract class StackValue {
@Override
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) {
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 () {
blackBoxFile("regressions/kt1508.kt");
}
public void testKt1634() {
blackBoxFile("regressions/kt1634.kt");
}
}