-
Notifications
You must be signed in to change notification settings - Fork 790
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
Support consuming IL(C#)-defined generic T with AllowByRefLike anti-constraint #17597
Conversation
❗ Release notes required
Warning No PR link found in some release notes, please consider adding it.
|
Shall we add tests for builders? Classic and resumable? Since a bunch of continuations are getting codegened there as well as inlining and state machines. |
We don't propagate that generic anti-constraint to F# code, it really is only allowed for an ILCall expression. You mean like a generic builder, where the typar instantion would be e.g. |
I am thinking of some sensible real-world-like usecase involving a builder. |
tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.debug.bsl
Show resolved
Hide resolved
Mostly this, generic builders are less of a concern, I think.
For example, if we have a collection builder and we define a |
Implements #16800
Follows https://github.com/dotnet/runtime/blob/main/docs/design/features/byreflike-generics.md
Builds upon: https://github.com/fsharp/fslang-design/blob/main/FSharp-4.5/FS-1053-span.md
Deserves a (small) RFC update: fsharp/fslang-design#787