Add test for KT-49209
This commit is contained in:
+6
@@ -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 {
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
+6
@@ -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 {
|
||||
|
||||
+6
@@ -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 {
|
||||
|
||||
+5
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user