Return Unit.VALUE if Unit or Any is expected

StackValue.coerce will do its job in casting void to Unit correctly

 #KT-4212 Fixed
This commit is contained in:
Alexander Udalov
2013-12-04 19:41:02 +04:00
parent f19ede0637
commit 6276dd1483
3 changed files with 26 additions and 4 deletions
@@ -4764,6 +4764,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("compiler/testData/codegen/box/unit"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("kt4212.kt")
public void testKt4212() throws Exception {
doTest("compiler/testData/codegen/box/unit/kt4212.kt");
}
@TestMetadata("kt4265.kt")
public void testKt4265() throws Exception {
doTest("compiler/testData/codegen/box/unit/kt4265.kt");