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

semantic: is_reference_to_global_variable doesn't return expected value in specific case. #8217

Open
tbashiyy opened this issue Jan 2, 2025 · 0 comments
Labels
C-bug Category - Bug

Comments

@tbashiyy
Copy link
Contributor

tbashiyy commented Jan 2, 2025

What is this

Semantic.is_reference_to_global_variable doesn't return expected value in case of below.

js source code

Object = {}
console.log(Object);

When overriding global variable without declarations, I think this is no longer global variables.
But when checking Object identifier of console.log argument by using is_reference_to_global_variable, it returns true.

I think this is because of Object is still in root_unresolved_references.

What I want

In this case, is_reference_to_global_variable returns false.
Or I want to know another way to check whether identifier of global variable is overridden or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category - Bug
Projects
None yet
Development

No branches or pull requests

1 participant