Skip to content

[Crash] Array value set in UnderlyingArray const constructor #2424

@zerkawei

Description

@zerkawei

The following code crashes the IDE :

[UnderlyingArray(typeof(float), 3, true)]
public struct Foo
{
	public const Self UnitX = .(1,0,0);

	public float[3] vector;

	public this(float x, float y, float z)
	{
		vector[0] = x;
	}
}

The size of the underlying array doesn't seem to matter. The crash doesn't happen if UnitX is static rather than const.

Tested on latest nightly. (03/27/2026)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions