Skip to content

Allow a ref field to refer to a ref struct type #62243

@cston

Description

@cston

Currently, ref fields cannot refer to ref struct types.

ref struct R1<T>
{
}

ref struct R2<T>
{
    public ref R1<T> F; // error CS9050: A ref field cannot refer to a ref struct.
}

See #62186

See also #62098

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions