Skip to content

Missing unsafe modifier for static fields with sizeof() expression #1378

Closed
@mmusu3

Description

Tested at commit 859872b

Source:

struct TestStruct
{
    public int Data;

    public unsafe static readonly int Size = sizeof(TestStruct);
}

Output:

internal struct TestStruct
{
    public int Data;

    public static readonly int Size = sizeof(TestStruct);
}

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions