Replace explicit parameter with 'it': do not suggest when lambda is directly under "when" or "if"
Relates to #KT-35320
This commit is contained in:
committed by
Vladimir Dolzhenko
parent
daab07ea38
commit
6b2c87020b
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
// IS_APPLICABLE: false
|
||||
fun test(v: Boolean): (String) -> Int {
|
||||
return when (v) {
|
||||
true -> { { x -> taskOne(x) } }
|
||||
false -> { <caret>x -> taskTwo(x) }
|
||||
}
|
||||
}
|
||||
|
||||
fun taskOne(s: String) = s.length
|
||||
fun taskTwo(s: String) = 42
|
||||
Reference in New Issue
Block a user