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

conversion of lazy properties #47

Closed
petermichaux opened this issue Nov 24, 2017 · 1 comment
Closed

conversion of lazy properties #47

petermichaux opened this issue Nov 24, 2017 · 1 comment

Comments

@petermichaux
Copy link
Contributor

petermichaux commented Nov 24, 2017

This Swift

private lazy var name: String = {() -> String in
    return "abc"
}()

is translated to the following Kotlin

private lazy var name: String = {   -> 
    return "abc"
}()

I think it should result in the following Kotlin.

private val name: String by lazy {
    "abc"
}

The var, val issue is tricky. The return issue is tricky.

angelolloqui pushed a commit that referenced this issue Mar 17, 2018
@angelolloqui
Copy link
Owner

Partially fixed with 972daf0. However, the return statement is a different issue, related to how lambdas are translated (see #69)

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

No branches or pull requests

2 participants