Fix handling of lambdas in top-level destructuring declarations

This commit is contained in:
Ilya Chernikov
2021-03-08 23:46:37 +01:00
parent 22f1814911
commit 7d07010785
5 changed files with 105 additions and 24 deletions
@@ -2,4 +2,5 @@
fun Int.isOdd() = (this % 2) == 1
val list: List<Pair<Int, String>> = listOf(1 to "a", 2 to "b")
val (odds, evens) = list.partition { (i, _) -> i.isOdd() }
println(odds)
odds