generate more correct bytecode for casting Unit to other types

This commit is contained in:
Dmitry Jemerov
2015-03-24 19:46:02 +01:00
parent 9d618ca767
commit bb1410b20a
5 changed files with 36 additions and 4 deletions
@@ -890,6 +890,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
doTest(fileName);
}
@TestMetadata("asAny.kt")
public void testAsAny() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/asAny.kt");
doTest(fileName);
}
@TestMetadata("asForConstants.kt")
public void testAsForConstants() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/asForConstants.kt");
@@ -914,6 +920,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
doTest(fileName);
}
@TestMetadata("asUnit.kt")
public void testAsUnit() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/asUnit.kt");
doTest(fileName);
}
@TestMetadata("castGenericNull.kt")
public void testCastGenericNull() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/castGenericNull.kt");
@@ -926,6 +938,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
doTest(fileName);
}
@TestMetadata("lambdaToUnitCast.kt")
public void testLambdaToUnitCast() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/lambdaToUnitCast.kt");
doTest(fileName);
}
@TestMetadata("notIs.kt")
public void testNotIs() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/notIs.kt");