UAST: Fix annotation arguments processing

multiple unnamed arguments represented as value named expression with array initializer
 call kind for array in annotation argument should be "array initializer" instead of "method call"

 #KT-16600 Fixed Target Versions 1.1.5
This commit is contained in:
Vyacheslav Gerasimov
2017-08-24 16:33:52 +03:00
parent e0bf438195
commit 56a075eab6
10 changed files with 361 additions and 32 deletions
+14 -1
View File
@@ -1,5 +1,18 @@
annotation class IntRange(val from: Long, val to: Long)
annotation class RequiresPermission(val anyOf: IntArray)
annotation class WithDefaultValue(val value: Int = 42)
annotation class SuppressLint(vararg val value: String)
@RequiresPermission(anyOf = intArrayOf(1, 2, 3))
@IntRange(from = 10, to = 0)
fun foo(): Int = 5
@WithDefaultValue
@SuppressLint("Lorem")
fun foo(): Int = 5
@IntRange(0, 100)
@SuppressLint("Lorem", "Ipsum", "Dolor")
fun bar() = Unit