-
-
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
Improve autocompletion with get_node
#79386
Improve autocompletion with get_node
#79386
Conversation
This comment was marked as duplicate.
This comment was marked as duplicate.
Hey, this needs a rebase against the up-to-date |
3e63545
to
c8889a7
Compare
Done |
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.
Solid PR. Fixes a lot of paper cuts with the GDScript editor.
Thanks! |
Cherry-picked for 4.2.1. |
When resolving the type of a subscript access we call two different methods. One is meant to deduct the type of a get_node call on the the node which the script is attached to. This PR fixes this method to don't do this if the type is annotated. If this method does not resolve a get_node call we try again with a more general purpose method to deduct the type of an identifier, This method has the issue of always using the type of the last assigned expression (which is just |
Fixes #73638
Fixes #73164
Fixes #82592
Fixes (partially) #78860
by prioritizing annotated types over
get_node
. Also adds the script of the node if no type is annotated. Currently the sorting does seem broken withSCRIPT
type though and the members won't show up at the top (#85239 should fix the sorting problem).Through adding the script to the type this also
Fixes #82258