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

Type checking won't update when superclass is changed on type #81292

Closed
ryanabx opened this issue Sep 4, 2023 · 1 comment · Fixed by #90601
Closed

Type checking won't update when superclass is changed on type #81292

ryanabx opened this issue Sep 4, 2023 · 1 comment · Fixed by #90601

Comments

@ryanabx
Copy link
Contributor

ryanabx commented Sep 4, 2023

Godot version

4.2 dev 4

System information

Godot v4.2.dev4 - Windows 10.0.22621 - GLES3 (Compatibility) - AMD Radeon(TM) Graphics (Advanced Micro Devices, Inc.; 31.0.21023.2010) - AMD Ryzen 9 6900HS with Radeon Graphics (16 Threads)

Issue description

When modifying the type of an object's superclass, type checking lags behind and gives errors for functions that check types. (Piece is a subclass of Selectable, being changed from being a subclass of GameObject)

image

Workaround

The simple workaround is to reload the editor.

Steps to reproduce

  • Create class A
  • Create class B which extends A, save everything.
  • Create class C and make B extend C instead of A
  • Make function that checks if an object of type C is type B
  • Error should come up: Expression is of type "C" so it can't be of type "B".gdscript(-1)

Minimal reproduction project

No minimum reproduction project currently. Please ping me if this is necessary.

@jsjtxietian
Copy link
Contributor

I can not reproduce it with Godot v4.2.dev (f7c48cf) - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3060 (NVIDIA; 31.0.15.3619) - 11th Gen Intel(R) Core(TM) i7-11700K @ 3.60GHz (16 Threads)

But I guess this bug has something to do with time, maybe it is not easy to reproduce.

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

Successfully merging a pull request may close this issue.

4 participants