Nested lambda has shadowed implicit parameter: do not report when outer lambda 'it' is not used

#KT-26710 Fixed
This commit is contained in:
Toshiaki Kameyama
2018-11-26 19:43:46 +09:00
committed by Vyacheslav Gerasimov
parent 7ee13ca353
commit a0162adbf9
9 changed files with 52 additions and 10 deletions
@@ -5,6 +5,7 @@ fun bar(s: String) {}
fun test() {
foo {
bar(it)
foo {
bar(it<caret>)
}
@@ -5,6 +5,7 @@ fun bar(s: String) {}
fun test() {
foo { it ->
bar(it)
foo {
bar(it)
}
@@ -5,6 +5,7 @@ fun bar(s: String) {}
fun test() {
foo {
bar(it)
foo {
bar(it)
bar(it)
@@ -5,6 +5,7 @@ fun bar(s: String) {}
fun test() {
foo {
bar(it)
foo { it1 ->
bar(it1)
bar(it1)
@@ -5,6 +5,7 @@ fun bar(s: String) {}
fun test() {
foo {
bar(it)
foo { s ->
foo {
bar(it<caret>)
@@ -5,6 +5,7 @@ fun bar(s: String) {}
fun test() {
foo { it ->
bar(it)
foo { s ->
foo {
bar(it)
@@ -0,0 +1,14 @@
// PROBLEM: none
fun foo(f: (String) -> Unit) {}
fun bar(s: String) {}
fun test() {
foo {
foo {
foo {
bar(it<caret>)
}
}
}
}