Skip to content

Prevent placing ref fields on non-pointer boundaries #64520

Closed
@MichalStrehovsky

Description

@MichalStrehovsky

Similar to #12842 except for the following struct:

[StructLayout(LayoutKind.Explicit)]
ref struct RefStruct
{
    [FieldOffset(0)]
    public short X;
    [FieldOffset(2)]
    ref int Y;
}

We should not allow this to load.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions