-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure safety against subclass prevention methods
Previously, we were doing special casing to ensure that we were not caught by the `inherited` hook in a sealed class preventing us from subclassing the generic type. However, that was short-sighted since it only worked for sealed classes. But there are more cases where subclassing is not allowed and they are all handled via `inherited` hooks. So, the generic (hah, nice pun), way of addressing this is to override the `inherited` hook as we are creating a subclass and then placing the method back in its place. That makes sure that no-one can throw because we are subclassing.
- Loading branch information
Showing
2 changed files
with
83 additions
and
19 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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