Introduce language feature for array literals in annotations

This commit is contained in:
Mikhail Zarechenskiy
2017-03-21 02:49:03 +03:00
parent 0f1acab40d
commit bfe2ddf7c1
15 changed files with 79 additions and 4 deletions
@@ -0,0 +1,18 @@
annotation class Foo(
val a: IntArray = <!UNSUPPORTED_FEATURE!>[]<!>,
val b: FloatArray = <!UNSUPPORTED_FEATURE!>[1f, 2f]<!>,
val c: Array<String> = <!UNSUPPORTED_FEATURE!>["/"]<!>
)
@Foo
fun test1() {}
@Foo(a = <!UNSUPPORTED_FEATURE!>[1, 2]<!>, c = <!UNSUPPORTED_FEATURE!>["a"]<!>)
fun test2() {}
@Foo(<!UNSUPPORTED_FEATURE!>[1]<!>, <!UNSUPPORTED_FEATURE!>[3f]<!>, <!UNSUPPORTED_FEATURE!>["a"]<!>)
fun test3() {}
fun test4() {
[1, 2]
}