If you try to do Big.new(another_big) to copy a Big, it fails to copy over the original's values.
The _init function of Big checks m.is_class("Big") but per https://github.com/godotengine/godot/issues/21789 this fails.
The return of m.get_class() does not return "Big", but returns the native class "RefCounted", so an alternative solution is required.
Repro steps:
var some_big:Big = Big.new(99)
var copy_big:Big = Big.new(some_big)
Expected: copy_big's value should be 99
Result: copy_big's value is 0
This was found in Godot4 with source pulled from both godot and GodotBigNumberClass pulled today
If you try to do
Big.new(another_big)
to copy a Big, it fails to copy over the original's values.The
_init
function of Big checksm.is_class("Big")
but per https://github.com/godotengine/godot/issues/21789 this fails. The return ofm.get_class()
does not return "Big", but returns the native class "RefCounted", so an alternative solution is required.Repro steps:
Expected:
copy_big
's value should be 99 Result:copy_big
's value is 0This was found in Godot4 with source pulled from both godot and GodotBigNumberClass pulled today