Use concrete candidate to resolve collection literal
This helps to avoid resolution errors when there is local array-like function with the same signature as in built-ins
This commit is contained in:
+18
@@ -0,0 +1,18 @@
|
||||
// !LANGUAGE: +ArrayLiteralsInAnnotations
|
||||
// !DIAGNOSTICS: -UNUSED_VARIABLE, -UNSUPPORTED
|
||||
|
||||
annotation class Anno(val a: Array<String> = [""], val b: IntArray = [])
|
||||
|
||||
@Anno([], [])
|
||||
fun test() {}
|
||||
|
||||
fun arrayOf(): Array<Int> = TODO()
|
||||
fun intArrayOf(): Array<Int> = TODO()
|
||||
|
||||
fun local() {
|
||||
val a1: IntArray = [1, 2]
|
||||
val a2: IntArray = []
|
||||
|
||||
val s1: Array<String> = [""]
|
||||
val s2: Array<String> = []
|
||||
}
|
||||
Reference in New Issue
Block a user