-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Different nodes have same hashcode #4390
Labels
Question (AST)
Questions about nodes and relationships within the AST (not about how to use JavaParser)
Comments
Hi, The hashcode calculation for a variable declaration is based on the name, type, comments and initialisation expression attributes. |
jlerbsc
added
the
Question (AST)
Questions about nodes and relationships within the AST (not about how to use JavaParser)
label
Apr 27, 2024
But why the range are not considered? |
I don't know exactly. It's a functional equality which is obtained by an in-depth check of all the attributes which describe a node. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Question (AST)
Questions about nodes and relationships within the AST (not about how to use JavaParser)
Hello! I'm using JP, and in the following code, I found that variables have the same hashCode in different scopes
Here is the output. The ranges are different, but the hash code is Identical value. And is there any way to distinguish the two VariableDeclarators by hash code?
The text was updated successfully, but these errors were encountered: