[FIR] Transform annotations of type refs in body resolve stage

Also fix building CFG for annotation calls
This commit is contained in:
Dmitriy Novozhilov
2021-04-12 18:51:15 +03:00
committed by TeamCityServer
parent aec13defc4
commit 1f0ecade34
25 changed files with 96 additions and 45 deletions
@@ -0,0 +1,20 @@
// !LANGUAGE: +NewInference
// !DIAGNOSTICS: -UNUSED_VARIABLE -UNUSED_PARAMETER
// FILE: Foo.java
public class Foo {
public static <K, V> void create(java.util.Map<? extends K, ? extends V> m) { return null; }
}
// FILE: test.kt
fun test(properties: Map<String, String>, nullableProperties: Map<String, String>?) {
val f1 = Foo.create(select1(properties, myEmptyMap()))
val f2 = Foo.create(nullableProperties ?: myEmptyMap())
}
fun <T, R> myEmptyMap(): Map<T, R> = TODO()
@Suppress("INVISIBLE_REFERENCE")
fun <S> select1(x: S, y: S): <!HIDDEN, HIDDEN!>@kotlin.internal.Exact<!> S = y
@@ -1,4 +1,3 @@
// FIR_IDENTICAL
// !LANGUAGE: +NewInference
// !DIAGNOSTICS: -UNUSED_VARIABLE -UNUSED_PARAMETER
@@ -18,4 +17,4 @@ fun test(properties: Map<String, String>, nullableProperties: Map<String, String
fun <T, R> myEmptyMap(): Map<T, R> = TODO()
@Suppress("INVISIBLE_REFERENCE")
fun <S> select1(x: S, y: S): @kotlin.internal.Exact S = y
fun <S> select1(x: S, y: S): @kotlin.internal.Exact S = y