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

AsyncAwaitPropagation - java.lang.NoSuchFieldException: sym #750

Open
HeithoffM opened this issue Feb 5, 2023 · 0 comments
Open

AsyncAwaitPropagation - java.lang.NoSuchFieldException: sym #750

HeithoffM opened this issue Feb 5, 2023 · 0 comments

Comments

@HeithoffM
Copy link

I am trying to use the async await auto propagation feature and sometimes face the following error:
Caused by: java.lang.NoSuchFieldException: sym in the Util class

I narrowed it down to the test case below and the lines in the AsyncAwaitPropagationScanner Link. It seems like the scanner checks if the invocation is the Lang.await method and calls the Util.getElement method. Here, the MethodInvocationTree does not have a field sym, which is searched for, and so when a method invocation is propagated, the Util class just returns an error.
I am not sure what the intention is with these lines.

package test;

import jsweet.lang.Async;

public class A {
  public static int a1() {
    return A.a2(A.a3());
  }

  public static int a2(int i) {
    return i;
  }

  @Async
  public static int a3() {
    return 6;
  }
}
@HeithoffM HeithoffM changed the title AsyncAwaitPropagation - Cannot Find Sym AsyncAwaitPropagation - java.lang.NoSuchFieldException: sym Feb 5, 2023
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