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
+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()
}