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

Fix resolution of dynamic types when only proper supertypes are exposed through GDExtension #493

Merged

Conversation

konczg
Copy link
Contributor

@konczg konczg commented Jun 14, 2024

Originally, using Object.method_get_class meant that we tried using an object's dynamic type even if it was not registered with GDExtension, which resulted in falling back to the default case of using the static type from the method signature. This PR fixes this by introducing a call to gi.object_get_class_name, which will return the name of the most specialized subtype that is still registered with GDExtension. If this fails for some reason, we fall back to the previous method.

@migueldeicaza migueldeicaza merged commit fe24cb0 into migueldeicaza:main Jun 14, 2024
2 checks passed
@migueldeicaza
Copy link
Owner

Thank you for your contributioN!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants