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