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

ClassDB does not handle virtual methods completely #65534

Open
RedMser opened this issue Sep 8, 2022 · 1 comment
Open

ClassDB does not handle virtual methods completely #65534

RedMser opened this issue Sep 8, 2022 · 1 comment

Comments

@RedMser
Copy link
Contributor

RedMser commented Sep 8, 2022

Godot version

4.0 alpha 16

System information

Windows 10

Issue description

Not all methods of ClassDB seem to know how to handle virtual methods. See code below for examples on which work and which don't:

Steps to reproduce

print(ClassDB.class_get_method_list(&"Node")) # contains _process among other methods, like expected
print(ClassDB.class_has_method(&"Node", &"_process")) # returns false, this is a bug!
# I have not tried ClassDB::get_method since it has no gdscript bindings, but in the C++ code it looks like it does not handle virtual methods either...

Minimal reproduction project

No response

@Calinou Calinou added this to the 4.0 milestone Sep 9, 2022
@Calinou Calinou moved this to To Assess in 4.x Priority Issues Sep 9, 2022
@reduz
Copy link
Member

reduz commented Jan 6, 2023

This is for the most part by design, although its quite weird. In the Godot ClassDB API, there is a rule where virtual methods can't be called externally, only overriden by classes inheriting it, so as they can't be called they only appear in the listing, but you can't really access them in any way.

This probably should be documented somewhere, I guess, but its not a bug.

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

4 participants