-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Allow a ref field to refer to a ref struct type #62243
Comments
And Allow it recursive: ref struct ParentIds
{
int Id;
readonly ref ParentIds Parent;
} without
and
|
Maybe also introduce something like ref struct ReadOnlyRefStack<T>
{
T Item;
readonly ref readonly ReadOnlyRefStack<T> Prev;
//[...]
} and static string Join(ReadOnlySpan<char> seperator, params ReadOnlyRefStack<string> values) => // ... |
Closing as this is less a compiler issue and more a language design issue. |
What would be the appropriate repo for this issue? And why does this issue get closed as |
csharplang would be the place for it, yes. |
Thanks, I have opened the discussion there. |
Currently,
ref
fields cannot refer toref struct
types.See #62186
See also #62098
The text was updated successfully, but these errors were encountered: