Thanks to visit codestin.com
Credit goes to github.com

Skip to content

1776 Generic Virtual Method Causes Invalid Program: Fix + test #2026

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
Nov 30, 2022

Conversation

rmadsen-ks
Copy link
Contributor

  • If a method is virtual AND generic, it cannot be overridden by the python class. Hence the method call is deferred to the base class.
  • Added a unit test which verifies this behavior is now working.

Close #1776

Checklist

Check all those that are applicable and complete.

  • Make sure to include one or more tests for your change
  • If an enhancement PR, please create docs and at best an example
  • Ensure you have signed the .NET Foundation CLA
  • Add yourself to AUTHORS
  • Updated the CHANGELOG

- If a method is virtual AND generic, it cannot be overridden by the python class. Hence the method call is deferred to the base class.
- Added a unit test which verifies this behavior is now working.
@rmadsen-ks rmadsen-ks force-pushed the 1776-VirtualGenericMethodFix branch from c699cbb to d4e3c18 Compare November 29, 2022 13:24
@lostmsu lostmsu merged commit 1729698 into pythonnet:master Nov 30, 2022
elan-ajain pushed a commit to elancapital/pythonnet that referenced this pull request Feb 17, 2023
…nnet#2026)

- If a method is virtual AND generic, it cannot be overridden by the python class. Hence the method call is deferred to the base class.
- Added a unit test which verifies this behavior is now working.

NOTE: The test causes crash when run from `PythonTestRunner`. See pythonnet#2035
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.

Generic virtual method in baseclass causes InvalidProgramException
2 participants