Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autocomplete don`t work in some specific cases (self and direct class hierarchy) #89614

Closed
jpVm5jYYRE1VIKL opened this issue Mar 17, 2024 · 4 comments

Comments

@jpVm5jYYRE1VIKL
Copy link

Tested versions

  • reproducible in 4.2.1

System information

Godot v4.2.1.stable unknown - Manjaro Linux #1 SMP PREEMPT_DYNAMIC Fri Mar 1 18:16:16 UTC 2024 - X11 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 4070 Ti SUPER (nvidia; 550.54.14) - Intel(R) Core(TM) i7-14700KF (28 Threads)

Issue description

It is quite often practice to use self. for recognition class defined
variables usage from local variables usage which are without self prefix.
In current moment in situation like in screenshot autocomplete fail to work .
Working autocomplete (no self ):

Working autocomplete

Not Working autocomplete (using self ):

Not Working autocomplete

Also persist situations in case of usage Enums autocomplete working only for Global scope enums usage
Like in screenshot :

Working enum autocomplete using global enum scope:
ksnip_20240317-170611

But in case if used direct class member Enum define in parameters which is quite logical and predictable . Autocomplete fail to work.
ksnip_20240317-171013

Steps to reproduce

steps to reproduce so simple and do not require anything special

Minimal reproduction project (MRP)

it is not required any project and reproducible even with one node and default binded script.

@AThousandShips
Copy link
Member

The part about self is solved, see:

Please try 4.2.2.rc2

@AThousandShips
Copy link
Member

AThousandShips commented Mar 17, 2024

The second part I'm unsure about, that's an unusual way to access an enum

Also, please be aware that self isn't necessary, and shouldn't be used unless you need to, using self ignores any safety checks so you lose a lot of code features if you use self all the time, there's no reason to use self unless you need it specifically, I'm not sure where you read that it's a good practice to use it

@HolonProduction
Copy link
Member

As mentioned before, the self problem is already fixed on master. Your enum problem is a duplicate of #88858 and would likely be fixed by #89382. So I'd suggest closing this issue as duplicate.

@jpVm5jYYRE1VIKL
Copy link
Author

Hi . Sorry for dupe.
Yes we can close

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants