-
Notifications
You must be signed in to change notification settings - Fork 21
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
Generic struct type whose fields are all unmanaged types is unmanaged #692
Comments
This is actually quite easy to implement and it should not be a breaking change. We should make this change to follow C#. |
We would also need to interop with C# by looking at the |
For reference, here's a link to the original PR for C#, which is now merged: dotnet/roslyn#31148. Edit: apparently more work was done on several PR's, here's all: https://github.com/dotnet/roslyn/commits/features/unmanaged-constructed-types. |
@TIHan as a part of this we should also update the Span 'n Friends RFC |
Yes and we would need to update docs as well. |
I have a PR for this: dotnet/fsharp#6064 |
* Added an RFC for fsharp/fslang-suggestions#692 * Simplify summary * Added more verbose error message example; Change wording in the detailed design * Added more examples; Added description of the unmanaged types; Added supportedd types section; Updated motivation section * Update RFCs/FS-1090-Generic-struct-type-whose-fields-are-all-unmanaged-types-is-unmanaged.md Co-authored-by: Phillip Carter <[email protected]> * Update RFCs/FS-1090-Generic-struct-type-whose-fields-are-all-unmanaged-types-is-unmanaged.md Co-authored-by: Phillip Carter <[email protected]> * Update RFCs/FS-1090-Generic-struct-type-whose-fields-are-all-unmanaged-types-is-unmanaged.md Co-authored-by: Phillip Carter <[email protected]> * Update RFCs/FS-1090-Generic-struct-type-whose-fields-are-all-unmanaged-types-is-unmanaged.md Co-authored-by: Phillip Carter <[email protected]> * Update RFCs/FS-1090-Generic-struct-type-whose-fields-are-all-unmanaged-types-is-unmanaged.md Co-authored-by: Phillip Carter <[email protected]> * Update RFCs/FS-1090-Generic-struct-type-whose-fields-are-all-unmanaged-types-is-unmanaged.md Co-authored-by: Phillip Carter <[email protected]> * Update RFCs/FS-1090-Generic-struct-type-whose-fields-are-all-unmanaged-types-is-unmanaged.md Co-authored-by: Phillip Carter <[email protected]> * Address RFC comments; Added modreq requirement; Added more examples; Re-phrased some definitions * Update RFCs/FS-1090-Generic-struct-type-whose-fields-are-all-unmanaged-types-is-unmanaged.md Co-authored-by: Phillip Carter <[email protected]> * Update RFCs/FS-1090-Generic-struct-type-whose-fields-are-all-unmanaged-types-is-unmanaged.md Co-authored-by: Phillip Carter <[email protected]> * Update RFCs/FS-1090-Generic-struct-type-whose-fields-are-all-unmanaged-types-is-unmanaged.md Co-authored-by: Phillip Carter <[email protected]> * Update RFCs/FS-1090-Generic-struct-type-whose-fields-are-all-unmanaged-types-is-unmanaged.md Co-authored-by: Phillip Carter <[email protected]> * Address PR comments. Co-authored-by: Phillip Carter <[email protected]>
This was done via dotnet/fsharp#12154, this suggestion can be closed. |
Generic struct type whose fields are all unmanaged types is unmanaged
into
as
as for cases
The existing way of approaching this problem in F# is prevent compilation with error
I have asked the question on SO and found that it is F# limitation, not CLR.
Pros and Cons
See
Related suggestions
Extra information
Related suggestions:
dotnet/csharplang#1504
dotnet/csharplang#1649
Affidavit (please submit!)
Please tick this by placing a cross in the box:
Please tick all that apply:
The text was updated successfully, but these errors were encountered: