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:
Toshiaki Kameyama
2019-12-06 14:13:43 +01:00
committed by Vladimir Dolzhenko
parent daab07ea38
commit 6b2c87020b
11 changed files with 89 additions and 0 deletions
@@ -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