Godot version:
3.2 beta2
Issue description:
Soo there's this old issue #7080 which is a bit chaotic, so I decided to make a fine tracker for all the cases. If someone knows an example of go to definition failing, pls comment. Also not all examples have issues created, so scroll below for code.
So far it is known that go to definition (Ctrl + Click) fails on:
Non-issued examples:
const THE_SCRIPT = preload("res://TheScript.gd")
var variable: THE_SCRIPT #fails
var b = THE_SCRIPT.new() #works
var test: Control
test.set_visible(false) #should jump to visible property doc, goes to Control
onready var test_node: Control = $Some/Control
func _ready() -> void:
test_node.hide() #hide isn't found
class_name TestClass
var velocity: Vector2
#another script
func test(test_obj: TestClass):
test_obj.velocity.reflect(Vector2()) #can't go to reflect
class_name Test
func test_method():
pass
#another script
func meth(arg: Test, vec: Vector2):
var brg := Test.new()
arg.test_method() #this doesn't work (can't go to definition)
brg.test_method() #this does
vec.normalized() #this too
func some_func():
MySingleton.do_stuff() #clicking MySingleton won't work, but do_stuff() will jump correctly
[ ?] Property Descriptions
e.g. methods set (get) _process_priority should point to the process_priority property
https://docs.godotengine.org/en/3.1/classes/class_node.html#class-node-method-set-process-priority
https://docs.godotengine.org/en/latest/classes/class_node.html#class-node-method-set-process-priority
https://docs.godotengine.org/en/latest/classes/class_node.html#class-node-property-process-priority
Also, this does not work with scene singletones (the scene script is internal). At the same time, if you click on the singleton property, it will work.
"Typed onready var" example works if the script belongs to the currently open scene.
Most helpful comment
Also, this does not work with scene singletones (the scene script is internal). At the same time, if you click on the singleton property, it will work.