[RAW FIR] Put destructuring statements outside of main lambda block
This fixes a false positive REDECLARATION when you want to shadow a destructured lambda parameter inside the lambda. #KT-60771 Fixed
This commit is contained in:
committed by
Space Team
parent
6a9c50325e
commit
8de36c416e
@@ -6,8 +6,12 @@ fun foo3(i: (Pair) -> Unit) {}
|
||||
|
||||
fun bar(x: Int, y: Int) {
|
||||
foo1 { x -> x }
|
||||
foo2 { x: Int, y: Int -> x + y }
|
||||
foo3 { (x, y) -> x + y }
|
||||
foo2 { x: Int, y: Int ->
|
||||
val x = x
|
||||
}
|
||||
foo3 { (x, y) ->
|
||||
val x = x
|
||||
}
|
||||
}
|
||||
|
||||
data class Pair(val a: Int, val b: Int)
|
||||
Reference in New Issue
Block a user