[FIR] Resolve array literal argument for non-primitive-array parameter as arrayOf call in annotation calls

This allows us to properly complete array literals arguments of
annotation calls fixing several false-negative type mismatch errors
as well as enabling the inference of generic type arguments.

#KT-59581 Fixed
#KT-58883 Fixed
This commit is contained in:
Kirill Rakhman
2023-07-18 12:01:05 +02:00
committed by Space Team
parent e69b695efd
commit 97024d9ccb
14 changed files with 145 additions and 34 deletions
@@ -20,10 +20,10 @@ fun test3() {}
@Foo([<!CLASS_LITERAL_LHS_NOT_A_CLASS!>Gen<Int>::class<!>])
fun test4() {}
@Foo([""])
@Foo(<!ARGUMENT_TYPE_MISMATCH!>[""]<!>)
fun test5() {}
@Foo([Int::class, 1])
@Foo(<!ARGUMENT_TYPE_MISMATCH!>[Int::class, 1]<!>)
fun test6() {}
@Bar