-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Fixed creating generic type with abstract type when it is has a default constractor constrant #101963
Conversation
Tagging subscribers to this area: @mangod9 |
|
I am trying to think of a use case where someone would want a none installable type when you are expecting one so I don't think it would be a braking change but I get what you mean someone could still be using it in that way I will still go through and do the checks for where you specified and check if there is more that I am missing |
I don't know how you would make it do the check for runtime/src/coreclr/tools/Common/TypeSystem/Common/TypeSystemConstraintsHelpers.cs |
@dotnet-policy-service agree |
That one already behaves according to the ECMA-335 spec. It goes to here:
That goes to here: runtime/src/coreclr/tools/Common/TypeSystem/Ecma/EcmaType.cs Lines 386 to 389 in e1c6717
|
The change to mono runtime looks good to me. |
@Faolan-Rad Is this work still planned to be completed? |
I don't really know what else is needed does it need a unit test to be made for it? |
Yes, a test would be great. Since we're changing behavior we would need to have it covered in our pipelines. |
…ult constructor constraint
Its is up to date now and I believe I added the test correctly that was needed I put it in the reflection tests |
Thank you very much! I think that's the last thing we need for this fix. Can we get a review please? @lambdageek @thaystg @fanyang-mono @MichalStrehovsky |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new test does not build:
src/tests/reflection/DisallowAbstractConstructors/DisallowAbstractConstructors.cs(43,95): error CS1002: ; expected [/__w/1/s/src/tests/reflection/DisallowAbstractConstructors/DisallowAbstractConstructors.csproj]
Seems like a typo of a missing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd hold off merging this until RC1 is snapped off due to the breaking change potential.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mono related change looks good to me!
I think this fixes the bug that I was having