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
Godot v4.1.stable - Linux Mint 19.1 (Tessa) - Vulkan (Compatibility)
Issue description
The code var constructor : Callable = CustomClass.new works exactly as expected in the editor and in debug exports.
In release exports however, this causes: SCRIPT ERROR: Parse Error: Cannot find member "new" in base "CustomClass".
This error seems to always occur regardless of what CustomClass extends, and regardless of whether _init is defined.
WORKAROUND:
Wrapping every constructor callable in func(): return CustomClass.new() solves this issue, but is annoying and shouldn't be something discovered only upon attempting a release export.
Steps to reproduce
This is very simple to reproduce, but I created a reproduction project anyway just in case something weird is going on with the default Linux export presets.
Running it in the editor or after exporting it as a debug export will print SUCCESS.
Exporting it as a release export and running it will print FAILED and make the error apparent (if run from console).
Godot version
v4.1.stable.official [9704596]
System information
Godot v4.1.stable - Linux Mint 19.1 (Tessa) - Vulkan (Compatibility)
Issue description
The code
var constructor : Callable = CustomClass.new
works exactly as expected in the editor and in debug exports.In release exports however, this causes:
SCRIPT ERROR: Parse Error: Cannot find member "new" in base "CustomClass".
This error seems to always occur regardless of what CustomClass extends, and regardless of whether _init is defined.
WORKAROUND:
Wrapping every constructor callable in
func(): return CustomClass.new()
solves this issue, but is annoying and shouldn't be something discovered only upon attempting a release export.Steps to reproduce
This is very simple to reproduce, but I created a reproduction project anyway just in case something weird is going on with the default Linux export presets.
Running it in the editor or after exporting it as a debug export will print SUCCESS.
Exporting it as a release export and running it will print FAILED and make the error apparent (if run from console).
Minimal reproduction project
Test.zip
The text was updated successfully, but these errors were encountered: