Fix casts of Unit value to other types

This commit is contained in:
Alexander Udalov
2015-07-04 03:10:09 +03:00
parent 62c22bf0ec
commit cb03f0df5a
7 changed files with 52 additions and 15 deletions
@@ -829,12 +829,6 @@ 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");
@@ -889,6 +883,18 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
doTest(fileName);
}
@TestMetadata("unitAsAny.kt")
public void testUnitAsAny() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/unitAsAny.kt");
doTest(fileName);
}
@TestMetadata("unitAsSafeAny.kt")
public void testUnitAsSafeAny() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/unitAsSafeAny.kt");
doTest(fileName);
}
@TestMetadata("unitNullableCast.kt")
public void testUnitNullableCast() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/unitNullableCast.kt");
@@ -888,6 +888,12 @@ public class BlackBoxWithStdlibCodegenTestGenerated extends AbstractBlackBoxCode
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/casts/asWithGeneric.kt");
doTestWithStdlib(fileName);
}
@TestMetadata("unitAsInt.kt")
public void testUnitAsInt() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/casts/unitAsInt.kt");
doTestWithStdlib(fileName);
}
}
@TestMetadata("compiler/testData/codegen/boxWithStdlib/classes")