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:
committed by
Mikhail Glukhikh
parent
54cb575819
commit
141ffa27dc
+12
@@ -0,0 +1,12 @@
|
||||
// "Remove 'val' from parameter" "true"
|
||||
class Pair<A, B>
|
||||
{
|
||||
operator fun component1(): A = null!!
|
||||
operator fun component2(): B = null!!
|
||||
}
|
||||
|
||||
fun f(list: List<Pair<String, String>>) {
|
||||
for (val<caret> (x,y) in list) {
|
||||
|
||||
}
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
// "Remove 'val' from parameter" "true"
|
||||
class Pair<A, B>
|
||||
{
|
||||
operator fun component1(): A = null!!
|
||||
operator fun component2(): B = null!!
|
||||
}
|
||||
|
||||
fun f(list: List<Pair<String, String>>) {
|
||||
for ((x,y) in list) {
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user