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
Static MethodCallExpr Resolving Problem #1491
Comments
Concerning your second problem, I can answer the question. (But I don't know about the first problem you mentioned). What's happening here is that in this part of your code:
...you are visiting the scope of the method call expression You then try to resolve the type of the If you only wish to resolve the called method, you can simply resolve the entire If, however, you do wish to resolve the type of the scope, then make sure that you only try to do so when the scope is an expression that can be resolved to a type but not a type by itself. Unfortunately, JSS provides no way to distinguish these two cases. This is a known problem (see #1439, #1480 for ample discussions about this problem). |
Reading the first problem: the indicated file on line 22 has a blank line. I am ignoring the first point and looking at the test code. |
I think the issue here is that |
Which by the way was what @malteskoruppa correctly figured out months ago :D |
Removing bug report label as in my opinion is not a bug but it is clearly a confusing API that we should clarify and improve. |
Isn't it more or less solved now? |
Yes, my understanding is that we can merge the PR and then close this task |
Add a test for #1491 and modify the behavior of JavaParserFacade.getType
@ftomassetti Awesome, thanks for this! :-) |
Thank you @malteskoruppa ! |
Hello. When I tried to resolve methodcallexpr, I found some bug.
This is on 3.5.20.
MethodCallExprContext line 157: context return null. So It Throw RuntimeException
I guess some errors on solveType() function on StatementContext(Wrapped BlockStmt).
Here is target project from git: https://github.com/davidar/lljvm
and positions is src/lljvm/runtime/Function.java line 22.
So To find the solution to the first bug, I make some short code and found another bug.
How to fix UnsolvedSymbolException?
Why does not some nodes resolve?
!ref.isSolved()
Here is my whole test code:
The text was updated successfully, but these errors were encountered: