Files
kotlin-fork/compiler/testData/codegen/box/inference/unsafeVarianceCodegen.kt
T
2023-12-26 10:18:19 +00:00

12 lines
205 B
Kotlin
Vendored

// JVM_ABI_K1_K2_DIFF: KT-63858
class A<out K> {
fun foo(x: @UnsafeVariance K): K = x
}
fun test(a: A<*>): Any? {
return a.foo("OK")
}
fun box(): String {
return test(A<String>()) as String
}