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
+9
@@ -0,0 +1,9 @@
|
||||
fun test(v: Boolean): (String) -> Int {
|
||||
return when (v) {
|
||||
true -> { { <caret>x -> taskOne(x) } }
|
||||
false -> { x -> taskTwo(x) }
|
||||
}
|
||||
}
|
||||
|
||||
fun taskOne(s: String) = s.length
|
||||
fun taskTwo(s: String) = 42
|
||||
Reference in New Issue
Block a user