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

Generate code for extension with lambdas #85

Open
radimjanda754 opened this issue Jul 13, 2023 · 0 comments
Open

Generate code for extension with lambdas #85

radimjanda754 opened this issue Jul 13, 2023 · 0 comments

Comments

@radimjanda754
Copy link

I would like to generate swift code for following extension:

fun ExceptionData.blockingError(
    onLoginClicked: (() -> Unit)? = null,
    onRegisterClicked: (() -> Unit)? = null,
    onRetryClicked: () -> Unit,
) : BlockingError

However the plugin generates lambdas as Function0 which doesn't work.

public extension shared.ExceptionData {

  @discardableResult
  public func blockingError(
    onLoginClicked: Function0<Void>,
    onRegisterClicked: Function0<Void>,
    onRetryClicked: Function0<Void>
  ) -> BlockingError

Could it be possible to properly generate code for lambdas?

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

No branches or pull requests

1 participant