val / var are now forbidden on a loop multi declaration parameter #KT-6274 Fixed

VAL_OR_VAR_ON_LOOP_MULTI_PARAMETER error added
KtValVarKeywordOwner interface added for PSIs that have getValOrVarKeyword method
This commit is contained in:
Anton Sukhonosenko
2015-10-26 01:47:16 +03:00
committed by Mikhail Glukhikh
parent 54cb575819
commit 141ffa27dc
17 changed files with 119 additions and 20 deletions
@@ -8,7 +8,7 @@ class A {
}
fun foo(list: List<A>) {
for (var (c1, c2, c3) in list) {
for (<!VAL_OR_VAR_ON_LOOP_MULTI_PARAMETER!>var<!> (c1, c2, c3) in list) {
<!UNUSED_VALUE!>c1 =<!> 1
c3 + 1
}