Add test for KT-49209

This commit is contained in:
Victor Petukhov
2021-10-19 12:51:37 +03:00
parent e0a4704c21
commit abe607f4ea
5 changed files with 35 additions and 0 deletions
@@ -29034,6 +29034,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
runTest("compiler/testData/codegen/box/platformTypes/kt47785.kt");
}
@Test
@TestMetadata("kt49209.kt")
public void testKt49209() throws Exception {
runTest("compiler/testData/codegen/box/platformTypes/kt49209.kt");
}
@Test
@TestMetadata("rawTypeWithNestedClass.kt")
public void testRawTypeWithNestedClass() throws Exception {
+12
View File
@@ -0,0 +1,12 @@
// TARGET_BACKEND: JVM
// IGNORE_BACKEND_FIR: JVM_IR
// JVM_TARGET: 1.8
// FULL_JDK
import java.util.Optional
fun <T> T?.toOptional(): Optional<T> = Optional.ofNullable(this)
fun box(): String {
return "OK".toOptional().get()
}
@@ -28896,6 +28896,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
runTest("compiler/testData/codegen/box/platformTypes/kt47785.kt");
}
@Test
@TestMetadata("kt49209.kt")
public void testKt49209() throws Exception {
runTest("compiler/testData/codegen/box/platformTypes/kt49209.kt");
}
@Test
@TestMetadata("rawTypeWithNestedClass.kt")
public void testRawTypeWithNestedClass() throws Exception {
@@ -29034,6 +29034,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
runTest("compiler/testData/codegen/box/platformTypes/kt47785.kt");
}
@Test
@TestMetadata("kt49209.kt")
public void testKt49209() throws Exception {
runTest("compiler/testData/codegen/box/platformTypes/kt49209.kt");
}
@Test
@TestMetadata("rawTypeWithNestedClass.kt")
public void testRawTypeWithNestedClass() throws Exception {
@@ -24545,6 +24545,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
runTest("compiler/testData/codegen/box/platformTypes/kt47785.kt");
}
@TestMetadata("kt49209.kt")
public void testKt49209() throws Exception {
runTest("compiler/testData/codegen/box/platformTypes/kt49209.kt");
}
@TestMetadata("rawTypeWithNestedClass.kt")
public void testRawTypeWithNestedClass() throws Exception {
runTest("compiler/testData/codegen/box/platformTypes/rawTypeWithNestedClass.kt");