-
Notifications
You must be signed in to change notification settings - Fork 753
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
[Bug]: NodeFinder returns null
for a SimpleNameReferenceNode
#38522
Comments
The @lochana-chathura are there any workarounds temporarily for this? |
Although the null return is gone. I think it won't be helpful get the expectedType since we replace the prodClient-> part with a mocking simple variable node. :( |
Depends on PR #38245 |
This is a requirement for expectedType API implemented in the semantic API, In this case expectedType API is unable to provide the correct expectedType because we are not getting the correct node type. Returning mocking simple variable node won't be helpful in this case. |
Since the suggested workaround doesn't fulfill the requirement of the Expected Types API, decided to await the changes from #38245. Once it is completed, can check from the Semantic API to validate this case. |
Description
Consider following code sample
Here if we try to get the
BLangNode
related toprodClient
usingNodeFinder
it returnsnull
nodeSteps to Reproduce
prodClient
)lineRange()
for the considered node (this is aSimpleNameReferenceNode
)nodeFinder.lookup(bLangCompilationUnit, node.lineRange())
Affected Version(s)
No response
OS, DB, other environment details and versions
No response
Related area
-> Compilation
Related issue(s) (optional)
No response
Suggested label(s) (optional)
No response
Suggested assignee(s) (optional)
No response
The text was updated successfully, but these errors were encountered: