GDScript Intellisense for user defined class variables

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By JymWythawhy
:warning: Old Version Published before Godot 3 was released.

When I create an internal class in a script, the gdscript intellisense doesn’t seem to know about the variables of that class, and typing out the variable leaves that variable written in red text. For example, say I had something like this

 class Something:
    var trialArray = Vector2Array()

func SomeFunction():
    var trialSomething = Something.new()
    trialSomething.trial_array =....

the “trialArray” text attached to trialSomething would be in red, and wouldn’t have come up as an intellisense option for trial_something.

Is this functioning correctly (just a result of gdscript not being a statically typed language?), or is my version of Godot not working correctly? If it is functioning correctly, do you have any tips for getting around this/getting used to it? Do you just keep going back to the classes you are using and making sure you get the variable names spelled right?

I don’t know if this is the expected behavior, but I’ve noticed the same thing, as well as with e.g. supertype members and functions, so it isn’t just you.

jslater89 | 2016-11-16 16:24