Skip to content

Fix crash when abstract methods aren't implemented #196

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

Merged
merged 2 commits into from
Apr 4, 2016

Conversation

tonyroberts
Copy link
Contributor

and add simple example showing how to implement events.

When deriving from managed classes in Python don't create the final base method wrapper for abstract methods.

If an abstract method that hasn't been implemented in Python raise an Exception. Previously the base method was called, resulting in a crash.

This behaviour was noticed when trying to implement events declared on an interface when the implicit add_X and remove_X methods weren't implemented, and tests have been added to cover that case.
Test events can be implemented in Python and that raising them invokes any handlers added in managed code.
@tonyroberts tonyroberts merged commit de142ae into pythonnet:develop Apr 4, 2016
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.

1 participant