Files
kotlin-fork/compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/constable/constable.kt
T
Mikhael Bogdanov 409d36c911 Basic -Xrelease option support
#KT-29974 Fixed
2021-12-23 07:25:57 +00:00

16 lines
325 B
Kotlin
Vendored

// CHECK_BYTECODE_TEXT
// 2 CHECKCAST java/lang/constant/Constable
// 1 LOCALVARIABLE constable Ljava/lang/constant/Constable;
import java.lang.invoke.*
fun cond() = true
fun test(mh: MethodHandle?, mt: MethodType?) {
val constable = if (cond()) mh else mt
}
fun box(): String {
test(null, null)
return "OK"
}