Hi. I think this is a bug, or i am not getting something right on the flow of GDScript.

See, several classes have a internal ENUM, that you can use to configure function calls parameters.

Several of then are, in my understand, with a _tippo.

I will try to update this post, but i do not think this is exaustive, and i am just starting with one, but i remember others and i will keep commenting them.

If someone confirm this behaviour, its a bug, right? Then i shall report it.

Thanks for the effort in confirmation.

Thread The _ is incorrect

But the IDE does not acuse it.

BUT The compiler does.

Removing the underscore fix the thing:

No errors.

Can you show where _Thread is defined? Also it helps to post code rather than screenshots. You can post code by adding a "~~~" (without quotes) on a line by itself directly above and below the code you copy paste onto the forum. Thanks.

Its was defined as a onready var But using just var, the same behaviour:

Thats the formated code:

extends Node

onready var tretre = Thread.new()

func _ready():
	tretre.start(self,"dummy",null,_Thread.PRIORITY_HIGH)
	#Is the sugested code by the autocomplete, that the IDE does not alert, but when running the project, throws a error.
	tretre.start(self,"dummy",null,Thread.PRIORITY_HIGH)
	#Is the correct code, that does not return error
	pass 

func dummy():
	pass

This is a general case, there are others built-in with the same problem. I will post.

19 days later

I can duplicate the bug on Godot 3.4.4-stable, for both Thread and File.

Does anyone know where in the source code autocomplete is implemented?

I tried opening a copy of an existing project with Godot 3.2.3-stable, the oldest Godot version that I have installed, and the bug appears there.

It seems odd that the bug would have been around that long without being observed and reported. Are there any Project or Editor settings that could cause this?

8 months later