putting a compare on stack as void type is a nop, not an error

This commit is contained in:
Dmitry Jemerov
2011-06-17 17:01:30 +02:00
parent 167e5bb400
commit b7e6de73e8
2 changed files with 10 additions and 1 deletions
@@ -408,4 +408,10 @@ public class NamespaceGenTest extends CodegenTestCase {
public void testCheckCast() throws Exception {
blackBoxFile("checkCast.jet");
}
public void testPutBooleanAsVoid() throws Exception {
loadText("class C(val x: Int) { { x > 0 } } fun box() { val c = C(0) } ");
final Method main = generateFunction();
main.invoke(null); // must not fail
}
}