Allow destructuring in suspend lambda with suspend componentX

#KT-16113 Fixed
This commit is contained in:
Denis Zharkov
2017-02-02 10:58:29 +03:00
parent 59fe7444d1
commit 60c2579436
12 changed files with 132 additions and 8 deletions
@@ -0,0 +1,13 @@
// SKIP_TXT
class A {
suspend operator fun component1(): String = "K"
}
fun foo(<!UNUSED_PARAMETER!>c<!>: suspend (A) -> Unit) {}
fun bar() {
foo {
(x) ->
x.length
}
}