Fixed creating generic type with abstract type when it is has a default constractor constrant#101963
Fixed creating generic type with abstract type when it is has a default constractor constrant#101963ivdiazsa merged 3 commits intodotnet:mainfrom
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 |
jkotas
left a comment
There was a problem hiding this comment.
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 |
MichalStrehovsky
left a comment
There was a problem hiding this comment.
I'd hold off merging this until RC1 is snapped off due to the breaking change potential.
fanyang-mono
left a comment
There was a problem hiding this comment.
Mono related change looks good to me!
I think this fixes the bug that I was having