[interop] Filter deleted functions from Python-visible overload sets - #66
Merged
Merged
Conversation
A deleted function is not callable, yet it still entered the overload set and contributed a spurious conversion error to every failed-call report. That defeats SetDetailedException's rule that failures which are all C++ exceptions of one type are re-raised as that type. Un-xfails test34_no_ctors_in_base in test_crossinheritance.py, which expects TypeError for a class whose only constructors are deleted.
vgvassilev
reviewed
Sep 2, 2026
| remove_deleted_methods(std::vector<interop::TCppMethod_t>& methods) { | ||
| methods.erase(std::remove_if(methods.begin(), methods.end(), | ||
| [](interop::TCppMethod_t m) { | ||
| return Cpp::IsFunctionDeleted(m); |
Contributor
There was a problem hiding this comment.
I guess here the question for @Vipul-Cariappa is if the new system suggests deleted functions and is that what general c++ do?
Collaborator
There was a problem hiding this comment.
I believe this is filtering the lookup and not the overload resolution. This should be fine.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A deleted function is not callable, yet it still entered the overload set and contributed a spurious conversion error to every failed-call report. That defeats SetDetailedException's rule that failures which are all C++ exceptions of one type are re-raised as that type.
Fixes tests in the ROOT migration as well as
test34_no_ctors_in_basewhich expects TypeError for a class whose only constructors are deleted.