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

For existing surface area, classes marked as final should not have virtual methods. #5332

Closed
wants to merge 2 commits into from

Conversation

ahsonkhan
Copy link
Contributor

Fixes #5253 for existing identity surface.

For other parts of the repo (like in core/etc.), will follow-up separately and might consider a macro approach to make these ifdefs a little cleaner (an exception to the guideline to avoid using macros)

Copy link
Member

@antkmsft antkmsft left a comment

Choose a reason for hiding this comment

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

Preprocessor-conditional virtual could be a source of hidden and strange bugs, I explained more here: #5331 (comment)

Comment on lines -34 to -36
#else
protected:
#endif
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@LarryOsterman A good thing from this effort is we caught this protected: keyword with side effects, which was making unrelated structs like CacheKey etc. below protected, instead of private.

We can fix that now.

@antkmsft antkmsft dismissed their stale review February 9, 2024 02:06

unblocking

@ahsonkhan
Copy link
Contributor Author

Since this PR impacts existing, already GA'd, bits, I am going to turn it into a draft PR for now and fix it up in the next release with the rest of the codebase, including core (as part of #5334).

@ahsonkhan ahsonkhan marked this pull request as draft February 9, 2024 19:25
@ahsonkhan ahsonkhan added this to the 2024-03 milestone Feb 9, 2024
@ahsonkhan
Copy link
Contributor Author

Superseded by #5389

@ahsonkhan ahsonkhan closed this Feb 28, 2024
@ahsonkhan ahsonkhan deleted the FixVirtualExisting branch February 28, 2024 01:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
2 participants