Allow to use collection literals only in annotations
This commit is contained in:
+15
@@ -0,0 +1,15 @@
|
||||
fun test(): Array<Int> {
|
||||
<!UNSUPPORTED!>[1, 2]<!>
|
||||
<!UNSUPPORTED!>[1, 2]<!>[0]
|
||||
<!UNSUPPORTED!>[1, 2]<!>.get(0)
|
||||
|
||||
foo(<!UNSUPPORTED!>[""]<!>)
|
||||
|
||||
val <!UNUSED_VARIABLE!>p<!> = <!UNSUPPORTED!>[1, 2]<!> <!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>+<!> <!UNSUPPORTED!>[3, 4]<!>
|
||||
|
||||
return <!UNSUPPORTED!>[1, 2]<!>
|
||||
}
|
||||
|
||||
fun foo(<!UNUSED_PARAMETER!>a<!>: Array<String> = <!UNSUPPORTED!>[""]<!>) {}
|
||||
|
||||
class A(val a: Array<Int> = <!UNSUPPORTED!>[]<!>)
|
||||
Reference in New Issue
Block a user