-
Notifications
You must be signed in to change notification settings - Fork 797
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
struct tuples and struct anon records should be considered subtypes of System.ValueType #10006
Merged
Conversation
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 is now ready (need to double check it is green) |
Hmmm one failing test with a difference in a baseline, will look into it |
cartermp
approved these changes
Sep 6, 2020
This was
linked to
issues
Sep 6, 2020
nosami
pushed a commit
to xamarin/visualfsharp
that referenced
this pull request
Feb 23, 2021
…f System.ValueType (dotnet#10006) * tentative fix for 7618 * further part of fix * testing for various constraints * testing for various constraints * consider appropriately annotated type variables to have default constructors and default values * simplify code * add extra test case * add back missing file Co-authored-by: Phillip Carter <pcarter@fastmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See #7618
One part of the fix is the adjustment to the logic when enforcing a constraint that a type support a default constructor - adding cases for struct tuples and anonymous records
Another part of the fix is to make sure System.ValueType appears on the inheritance chain of struct tuples and anonymous records
The generic cases in Problematic differences in constraint handling for structs between C# and F# #7946 required addressing the issue of whether generic variables support default values or not, which had surprisingly not been addressed before.
All of these count as bug fixes within the context of F# 5.0 - bug #3 should really have been addressed years ago.
Testing for all these is added