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

compile fail when function params be used in lambda #5

Closed
qw623577789 opened this issue Nov 2, 2021 · 1 comment
Closed

compile fail when function params be used in lambda #5

qw623577789 opened this issue Nov 2, 2021 · 1 comment

Comments

@qw623577789
Copy link

qw623577789 commented Nov 2, 2021

raw code

  @Async(logResultTree = true)
  public <G> JPromise<Object> get(Object format) {
      JAsync.just().await();
      return JAsync.just(Optional.ofNullable(null).map(l -> format).get());
  }

compiled code

@Async(logResultTree = true)
public <G>JPromise<Object> get(Object format) {
    return JAsync.just().thenVoid(indyHelper$$0.voidPromiseFunction("get$$tmp$$1", java.lang.invoke.MethodType.methodType(io.github.vipcxj.jasync.spec.JPromise.class, java.lang.Object.class))).catchReturn();
}

private <G>io.github.vipcxj.jasync.spec.JPromise<java.lang.Void> get$$tmp$$1(final java.lang.Object tmp$$0) throws java.lang.Throwable {
    ;
    return io.github.vipcxj.jasync.spec.JAsync.doReturn(JAsync.just(Optional.ofNullable(null).map((l)->format).get()));
}

loss the format params in sub function

@qw623577789 qw623577789 changed the title compile fail when function params be used in lamda compile fail when function params be used in lambda Nov 2, 2021
@vipcxj
Copy link
Owner

vipcxj commented Nov 2, 2021

I have just released v0.1.6 that references this issue.

Closing this issue. Please re-open if you think there's still more to do.

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

2 participants