-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
self.
completion suggesting incorrect code
#85833
Comments
Confirmed in Linux too. |
|
self.
and singletons completion suggesting incorrect code
I'm pretty sure this is a regression as I could use this before and waiting for 4.3 seems odd. |
It being marked for 4.3 doesn't mean you have to wait for 4.3, if a compatible bug fix can be made it can be cherry picked for 4.2.x We only assign a released milestone to bugs if they are unique to that milestone, like a regression specifically in 4.2 that isn't in the development branch |
as a workaround you can use an external code editor like VSCode, and it will get around the missing instance variable and method issues. It will still kind of treat self and singletons like classes, but you'll actually be able to code with it. |
Well, this is awkward, I just tried this again and it doesn't work [edit] for self specifically, singletons work fine.[/edit] Edit: the real workaround is casting self as the class it is, which will force the completer to treat it as an instance. Edit 2: The final workaround I've come up with is to assign self to a variable while casting self as the class it is. It treat the variable as an instance otherwise. |
@HolonProduction changes to |
Yeah I read the isssue and you also described what caused the issue in you PR. What I don't understand is how these changes:
are related to the cause of the issue that you described in the PR (you said it had something todo with a wrong position being used in This issue (as in #85833) results from I also don't see what you are trying to do with So yeah IMO I would just try to revert all changes to |
self.
and singletons completion suggesting incorrect codeself.
completion suggesting incorrect code
@am45-001 No need to apologise, I wasn't going to be very involved either way |
@Vilcrow would it be appropriate for me to upload the custom version of 4.2.1 with your fix here? Or would I need to publish it somewhere else while we wait for the next version? |
Tested versions
Tested in v4.2.stable.official [46dc277], v4.2.1.stable.official [b09f793].
System information
Godot v4.2.stable - Windows 10.0.19045 - Vulkan (Forward+) - dedicated Radeon RX 580 Series (Advanced Micro Devices, Inc.; 31.0.21905.1001) - AMD Ryzen 5 3600 6-Core Processor (12 Threads)
Issue description
The self keyword are assumed to be classes by code completion (unlike before in v4.1 and previous versions), and only display constants, static functions, and new().
Edit: After further investigation by @Vilcrow, I jumped the gun on Singletons suffering the same issue as the self keyword. Apologies to @MitrB for stealing your thunder on this one.
Steps to reproduce
Minimal reproduction project (MRP)
BugProject.zip
The text was updated successfully, but these errors were encountered: