[NI] Properly support UnsafeVariance annotation
#KT-38134 Fixed #KT-34433 Fixed #KT-31823 Fixed
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user