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

Fix: Default generic values no longer cause compilation error #2967

Merged
merged 3 commits into from
Nov 2, 2022

Conversation

MikaelMayer
Copy link
Member

This PR fixes #2885
What happened was that, in the case of maps, the substitution for default value expressions did not verify if the type should be substituted.
The fix was to do the same check as for the displayExpressions just above.

By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.

@MikaelMayer MikaelMayer self-assigned this Nov 1, 2022
Copy link
Member

@atomb atomb left a comment

Choose a reason for hiding this comment

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

Although I'm not deeply familiar with the relevant code, the change you made seems right to me, given the equivalent pattern above.

@MikaelMayer MikaelMayer enabled auto-merge (squash) November 2, 2022 14:07
@MikaelMayer MikaelMayer merged commit ddd0cb3 into master Nov 2, 2022
@MikaelMayer MikaelMayer deleted the fix-2885-compile-type-parameter branch November 2, 2022 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot compile default generic values in C#
2 participants