Nested lambda has shadowed implicit parameter: do not report when outer lambda 'it' is not used
#KT-26710 Fixed
This commit is contained in:
committed by
Vyacheslav Gerasimov
parent
7ee13ca353
commit
a0162adbf9
+1
@@ -5,6 +5,7 @@ fun bar(s: String) {}
|
||||
|
||||
fun test() {
|
||||
foo {
|
||||
bar(it)
|
||||
foo {
|
||||
bar(it<caret>)
|
||||
}
|
||||
|
||||
+1
@@ -5,6 +5,7 @@ fun bar(s: String) {}
|
||||
|
||||
fun test() {
|
||||
foo { it ->
|
||||
bar(it)
|
||||
foo {
|
||||
bar(it)
|
||||
}
|
||||
|
||||
+1
@@ -5,6 +5,7 @@ fun bar(s: String) {}
|
||||
|
||||
fun test() {
|
||||
foo {
|
||||
bar(it)
|
||||
foo {
|
||||
bar(it)
|
||||
bar(it)
|
||||
|
||||
+1
@@ -5,6 +5,7 @@ fun bar(s: String) {}
|
||||
|
||||
fun test() {
|
||||
foo {
|
||||
bar(it)
|
||||
foo { it1 ->
|
||||
bar(it1)
|
||||
bar(it1)
|
||||
|
||||
Vendored
+1
@@ -5,6 +5,7 @@ fun bar(s: String) {}
|
||||
|
||||
fun test() {
|
||||
foo {
|
||||
bar(it)
|
||||
foo { s ->
|
||||
foo {
|
||||
bar(it<caret>)
|
||||
|
||||
Vendored
+1
@@ -5,6 +5,7 @@ fun bar(s: String) {}
|
||||
|
||||
fun test() {
|
||||
foo { it ->
|
||||
bar(it)
|
||||
foo { s ->
|
||||
foo {
|
||||
bar(it)
|
||||
|
||||
Vendored
+14
@@ -0,0 +1,14 @@
|
||||
// PROBLEM: none
|
||||
|
||||
fun foo(f: (String) -> Unit) {}
|
||||
fun bar(s: String) {}
|
||||
|
||||
fun test() {
|
||||
foo {
|
||||
foo {
|
||||
foo {
|
||||
bar(it<caret>)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user