You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# main.gdextendsNodefunc_ready():
CustomClass.new().mesh# autocomplete works as expectedAutoload.mesh# autocomplete works as expectedAutoload.custom_class.mesh# autocomplete acts as though custom_class were of type Object
(At this point I restart the editor because there seem to be some issues with autocomplete and fresh autoloads/custom classes anyway)
In the final line of main.gd, after typing Autoload.custom_class., autocomplete suggests only members of Object (eg. free(), add_user_signal(), etc.), and does not suggest any members of CustomClass nor of its base type Node
The text was updated successfully, but these errors were encountered:
Haydoggo
changed the title
Autocomplete incorrectly infers Autoload property types custom class types
Autocomplete incorrectly infers Autoload property types for custom class types
Feb 11, 2023
This is also similar to a problem I have where an autoload singleton has some onready vars to reference its children and, when I access them outside of the singleton using its global variable, Godot only autocompletes their base class methods and not the ones I wrote in the child script, even if everything is statically typed.
Godot version
v4.0.rc1.official [8843d9a]
System information
Windows 10
Issue description
When referencing an Autoload's property, if that property is a custom class, autocomplete will incorrectly infer the type of that property as
Object
.In Godot 3.5.1, this issue is not present and autocomplete acts as expected.
Steps to reproduce
Given the following 3 scripts:
↓ Add this one to Autoloads in project settings
(At this point I restart the editor because there seem to be some issues with autocomplete and fresh autoloads/custom classes anyway)
In the final line of
main.gd
, after typingAutoload.custom_class.
, autocomplete suggests only members ofObject
(eg.free()
,add_user_signal()
, etc.), and does not suggest any members ofCustomClass
nor of its base typeNode
Minimal reproduction project
AutoCompleteBug.zip
The text was updated successfully, but these errors were encountered: