[NI] Properly support UnsafeVariance annotation

#KT-38134 Fixed
 #KT-34433 Fixed
 #KT-31823 Fixed
This commit is contained in:
Mikhail Zarechenskiy
2020-04-16 04:27:22 +03:00
parent 1614c1b8a6
commit 4ffcbc0c2f
20 changed files with 244 additions and 20 deletions
@@ -1,10 +1,10 @@
// !WITH_NEW_INFERENCE
// FIR_IDENTICAL
interface A<out K> {
fun foo(x: @UnsafeVariance K): Unit
}
fun test(a: A<*>) {
a.foo(<!NI;NULL_FOR_NONNULL_TYPE!>null<!>)
a.foo(<!NI;TYPE_MISMATCH!>Any()<!>)
a.foo(null)
a.foo(Any())
}