RedundantLetInspection: fix false positive for inner lambda expression

#KT-25271 Fixed
This commit is contained in:
Dmitry Gridin
2019-10-25 22:10:28 +07:00
parent 5d16753285
commit 5fc70f6cfd
4 changed files with 34 additions and 7 deletions
@@ -0,0 +1,11 @@
// PROBLEM: none
// WITH_RUNTIME
val a = randomValue().let<caret> { r ->
List(10, fun(it: Int): Int {
return r
})
}
fun randomValue(): Int = 42
@@ -0,0 +1,7 @@
// PROBLEM: none
// WITH_RUNTIME
val a = randomValue().let<caret> { r -> List(10) { r } }
fun randomValue(): Int = 42