-
-
Notifications
You must be signed in to change notification settings - Fork 22k
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
GDScript: Fix annotation parsing adding new annotation entries #98146
GDScript: Fix annotation parsing adding new annotation entries #98146
Conversation
d1a2b6a
to
cbc62c5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Please add a test.
cbc62c5
to
a997e69
Compare
It's probably because of this: godot/core/templates/hash_map.h Lines 578 to 593 in 92e51fc
For some reason, the non- godot/core/variant/dictionary.cpp Lines 86 to 88 in 92e51fc
It's a shame that C++ has such a limited and confusing behavior. Maybe we should abandon creating new elements using |
Done! Really should start making a habit out of adding tests 😅 |
modules/gdscript/tests/scripts/parser/errors/annotation_unrecognized.gd
Outdated
Show resolved
Hide resolved
a997e69
to
140c6a6
Compare
Thanks! |
Fixes #98145
The code was indexing the annotation map regardless of the previous check which apparently introduces new entries. So the right error was only emitted for the first parsing but for any subsequent parsing the name would be present in the map.