Nested lambda has shadowed implicit parameter: do not report when lambda is in scope function
#KT-30173 Fixed
This commit is contained in:
committed by
Mikhail Glukhikh
parent
daf8df9e4b
commit
a2adfd0cc0
+10
@@ -0,0 +1,10 @@
|
||||
// PROBLEM: none
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun main() {
|
||||
listOf(42).map {
|
||||
it.also {
|
||||
<caret>it == 42
|
||||
}
|
||||
}
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
// PROBLEM: none
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun main() {
|
||||
listOf(42).map {
|
||||
it.let {
|
||||
<caret>it == 42
|
||||
}
|
||||
}
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
// PROBLEM: none
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun main() {
|
||||
listOf(42).map {
|
||||
it.takeIf {
|
||||
<caret>it == 42
|
||||
}
|
||||
}
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
// PROBLEM: none
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun main() {
|
||||
listOf(42).map {
|
||||
it.takeUnless {
|
||||
<caret>it == 42
|
||||
}
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
// FIX: Replace 'it' with explicit parameter
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun main() {
|
||||
listOf(42).map {
|
||||
it == 42
|
||||
1.also {
|
||||
<caret>it == 42
|
||||
}
|
||||
}
|
||||
}
|
||||
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
// FIX: Replace 'it' with explicit parameter
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun main() {
|
||||
listOf(42).map {
|
||||
it == 42
|
||||
1.also { it1 ->
|
||||
it1 == 42
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user