Closed 451507056 closed 2 months ago
It should be fixed by #75746.
PS: not 100% sure because there is no MRP
Can still reproduce this in 4.1.stable
Can still reproduce this in 4.1.stable
Can you post a code sample that reproduces the issue? Does it occur in a blank project with no other scripts and no open scene?
Yes. Just a script without anything else:
var outside = 2
func _ready():
var inside = 1
var k = {}
k[]
When typing inside of the brackets inside
and outside
are not proposed.
Some inside information:
The completion type of the completion context is COMPLETION_SUBSCRIPT
. This case only searchs inside properties of the class on which the subscript appears (here an dictionary). It does not search for local identifiers. The case seems to be written for the .
syntax which is also packed into the subscript node but has its own completion type (COMPLETION_ATTRIBUTE
). I will propably try to add new behaviour for this tomorrow.
When trying to access an enum stored in a pure class such as:
class_name HeroEnums
enum HeroType {
SPEED,
FLY,
POWER,
}
and then accessing this from another script, the first level autocomplete fails: heroes[HeroEn...]
will not autocomplete
but the second level autocomplete will work: heroes[HeroEnums.HeroTy...]
will autocomplete.
I'll ask on the PR if this is fixed too.
Godot version
4.0.2.stable
System information
windows10,gtx1050ti
Issue description
The bracket code prompt is not as good as it used to be.
Steps to reproduce
It was OK in 3.5.1, but not after 4.0.
Minimal reproduction project
none