Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Destructuring in Lambda Parameters #32

Closed
erokhins opened this issue Jul 2, 2016 · 2 comments
Closed

Destructuring in Lambda Parameters #32

erokhins opened this issue Jul 2, 2016 · 2 comments
Labels
Milestone

Comments

@erokhins
Copy link
Contributor

erokhins commented Jul 2, 2016

Proposal

@dzharkov
Copy link
Contributor

Current proposal says that "component-functions are resolved in the scope that contains the lambda",
does it also mean that the following example should not work?
I'm aware that it seems obvious, but still want to be sure my understanding is correct

class A

class D {
    operator fun A.component1() = 1.0
    operator fun A.component2() = ' '
}

fun foobar(block: D.(A) -> Unit) { }

fun bar() {
    // Error: component functions are unresolved
    foobar { (a, b) -> }
}

@abreslav abreslav added this to the 1.1 milestone Oct 10, 2016
@dzharkov
Copy link
Contributor

dzharkov commented Feb 14, 2018

The feature has been released in Kotlin 1.1, thus I'm closing the KEEP. Do not hesitate to open a YouTrack issue for any additional suggestions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants