[EXPERIMENTATION ONLY] - Prevent Reflection's MakeGenericType() from Allowing the Instantiation of Abstract Classes#105844
Conversation
|
Needs a test |
Is there indication the original PR is abandoned? The author looks to be waiting for next steps from area owners - might want to ping the author on the PR. It's not a good look to take someone's work and commit under own name. I see milestone 9.0 - do we still have runway to do breaking changes? |
It looks abandoned since it hasn't had any activity for the last 2-3 months. But I will ping the author. Also I marked it as draft for a reason. I wanted to do some experimentation with the CI first. Was planning to initiate the conversation once I had checked what I wanted to check.. |
MakeGenericType() from Allowing the Instantiation of Abstract ClassesMakeGenericType() from Allowing the Instantiation of Abstract Classes
|
We have push access to the branches with PRs. So for example if that PR is missing a test and the author doesn't react anymore, it's possible to just push a commit with the test to the branch, even if the author is non-responsive (not everyone can work on our schedules). We tend to do that so that we don't rob people of their contributions. Contributors GitHub handle shows up e.g. here: https://dotnet.microsoft.com/en-us/thanks. It wasn't clear to me this is for experimentation, I guess I'll see the intent here later. |
I've rephrased to make it extra clear that it is for experimentation purposes now. And I did not know we could just push to anyone's PR so that's good to know.. |
Original PR is #101963.
This PR aims to experiment with fixing the loophole where
MakeGenericType()does not fail when attempting to create an object from an abstract class, and thus resulting in incorrect behavior.