Skip to content

Make class methods virtual by default#2606

Open
EmilyBourne wants to merge 10 commits intodevelfrom
ebourne_virtual_default
Open

Make class methods virtual by default#2606
EmilyBourne wants to merge 10 commits intodevelfrom
ebourne_virtual_default

Conversation

@EmilyBourne
Copy link
Copy Markdown
Member

@EmilyBourne EmilyBourne commented Mar 19, 2026

In C function pointers are required in order to dispatch function calls at runtime. This is necessary for class inheritance. This PR adds the necessary print methods to make methods virtual by default. This is a first step towards handling inheritance. The next PR will add support for the @final decorator for classes and methods in order to retrieve performance


Pull request checklist

Please tick off items when you have completed them or determined that they are not necessary for this pull request:

  • Write a clear PR description
  • Ensure you appear in the AUTHORS file
  • Add tests to check your code works as expected
  • Update documentation if necessary
  • Update CHANGELOG.md
  • Ensure any relevant issues are linked
  • Ensure new tests are passing

@EmilyBourne EmilyBourne marked this pull request as draft March 19, 2026 16:27
@EmilyBourne EmilyBourne marked this pull request as ready for review March 20, 2026 16:49
@github-actions github-actions bot marked this pull request as draft March 20, 2026 17:25
@github-actions
Copy link
Copy Markdown

Unfortunately your PR is not passing the tests so it is not quite ready for review yet.

1 similar comment
@github-actions
Copy link
Copy Markdown

Unfortunately your PR is not passing the tests so it is not quite ready for review yet.

@EmilyBourne EmilyBourne marked this pull request as ready for review March 23, 2026 08:40
@github-actions
Copy link
Copy Markdown

Hey @pyccel/pyccel-dev ! @EmilyBourne has just created this great new pull request! Check it out and let me know what you think!

1 similar comment
@github-actions
Copy link
Copy Markdown

Hey @pyccel/pyccel-dev ! @EmilyBourne has just created this great new pull request! Check it out and let me know what you think!

Copy link
Copy Markdown

@pyccel-bot pyccel-bot bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job ! Your PR is using all the code it added/changed.

@EmilyBourne EmilyBourne mentioned this pull request Mar 30, 2026
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant