JavaMapForEachInspection: report for expression with implicit receiver

#KT-31833 Fixed
This commit is contained in:
Toshiaki Kameyama
2019-11-15 10:37:51 +09:00
committed by Yan Zhulanow
parent 85e8b56a02
commit 93db78e7ac
4 changed files with 39 additions and 20 deletions
@@ -0,0 +1,10 @@
// RUNTIME_WITH_FULL_JDK
fun test(map: Map<Int, String>) {
map.run {
<caret>forEach { key, value ->
foo(key, value)
}
}
}
fun foo(i: Int, s: String) {}
@@ -0,0 +1,10 @@
// RUNTIME_WITH_FULL_JDK
fun test(map: Map<Int, String>) {
map.run {
forEach { (key, value) ->
foo(key, value)
}
}
}
fun foo(i: Int, s: String) {}