Files
kotlin-fork/plugins/uast-kotlin/testData/AnnotationParameters.kt
T
Vyacheslav Gerasimov 56a075eab6 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
2017-09-01 13:31:50 +03:00

18 lines
443 B
Kotlin
Vendored

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)
@WithDefaultValue
@SuppressLint("Lorem")
fun foo(): Int = 5
@IntRange(0, 100)
@SuppressLint("Lorem", "Ipsum", "Dolor")
fun bar() = Unit