You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Calling super() in _init() when the base class does not define an _init() runs without issue in 4.1.2.stable but causes a parse error in 4.1.3.stable
#84850
Closed
blujai831 opened this issue
Nov 13, 2023
· 7 comments
Godot v4.1.3.stable - Manjaro Linux #1 SMP PREEMPT_DYNAMIC Thu Nov 9 03:01:44 UTC 2023 - X11 - Vulkan (Forward+) - integrated AMD Radeon Vega 10 Graphics (RADV RAVEN) () - AMD Ryzen 7 3750H with Radeon Vega Mobile Gfx (8 Threads)
Issue description
Calling super() in _init() when the base class does not define an _init() runs without issue in 4.1.2.stable but causes a parse error in 4.1.3.stable.
As I'm not an expert on Godot internals and don't know whether internal classes expose any function to GDScript as _init() (though a quick ag on my end suggests they do not), I can't say whether I expect this to work on 4.1.3.stable, or to not work on 4.1.2.stable, but either way, this seems to be a breaking change.
Steps to reproduce
The following GDScript code compiles and runs without issue in 4.1.2.stable, but in 4.1.3.stable, it causes a parse error and will neither compile nor run:
Yes, I'm in agreement that this was an intentional change! 😊
The idea is that if the GDScript user wrote a super() call expecting it to do something, but we can guarantee it will be a no-op since there is no base class method to call, then we should warn the user that there's some mismatch between what they intended to do and what is actually going to happen!
Hope that makes sense! If it does, I'd recommend closing the issue :)
Godot version
4.1.3.stable
System information
Godot v4.1.3.stable - Manjaro Linux #1 SMP PREEMPT_DYNAMIC Thu Nov 9 03:01:44 UTC 2023 - X11 - Vulkan (Forward+) - integrated AMD Radeon Vega 10 Graphics (RADV RAVEN) () - AMD Ryzen 7 3750H with Radeon Vega Mobile Gfx (8 Threads)
Issue description
Calling
super()
in_init()
when the base class does not define an_init()
runs without issue in 4.1.2.stable but causes a parse error in 4.1.3.stable.As I'm not an expert on Godot internals and don't know whether internal classes expose any function to GDScript as
_init()
(though a quickag
on my end suggests they do not), I can't say whether I expect this to work on 4.1.3.stable, or to not work on 4.1.2.stable, but either way, this seems to be a breaking change.Steps to reproduce
The following GDScript code compiles and runs without issue in 4.1.2.stable, but in 4.1.3.stable, it causes a parse error and will neither compile nor run:
Minimal reproduction project
repro.zip
The text was updated successfully, but these errors were encountered: