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

[4.0] deep_equal is missing #73049

Closed
Protowalker opened this issue Feb 10, 2023 · 1 comment
Closed

[4.0] deep_equal is missing #73049

Protowalker opened this issue Feb 10, 2023 · 1 comment

Comments

@Protowalker
Copy link

Godot version

4.0.dev

System information

Windows 10

Issue description

deep_equal was initially implemented by #42625. The code still exists and is still used internally, but has been renamed recursive_equal. Since it's used internally, my assumption is that it is working, and just hasn't been re-exposed. https://github.com/godotengine/godot/blob/master/core/variant/array.cpp#LL121C22-L121C22

Steps to reproduce

  1. Enter a gdscript file.
  2. Call deep_equal({}, {})
  3. A "not defined" error will appear.
  4. Call recursive_equal({}, {})
  5. A "not defined" error will appear.

Minimal reproduction project

N/A

@YuriSizov
Copy link
Contributor

In Godot 4 arrays and dictionaries are compared by value, and that comparison is performed internally by recursive_equal. This means you can simply use == and != to compare.

@YuriSizov YuriSizov closed this as not planned Won't fix, can't repro, duplicate, stale Feb 10, 2023
@YuriSizov YuriSizov removed this from the 4.x milestone Feb 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants