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
Method 'forEach' cannot be resolved in certain context #4330
Comments
There seems to be an inference problem when solving the foreach() method. I haven't been able to pinpoint the exact cause of this problem. |
Thank you for your reply. Can you explain more about "an inference problem"? What did you mean by that? |
The Iterable.foreach method is a generic method which takes a parameter which JP tries to determine in order to resolve the foreach method. |
I don't have a solution to this problem at the moment. |
To complete this issue i think this section describes the problem https://docs.oracle.com/javase/tutorial/java/generics/genTypeInference.html#target_types |
I need solution this code. |
I was trying to resolve argument types for all method call expressions(
MethodCallExpr.class
) in a method(Main Function in TestForEach.java in this case). I guess the exception happend with the generic type inList<String>
.Stack trace
Main function
TestForEach.java
The text was updated successfully, but these errors were encountered: