Skip to content

DMD 2.112.0 fails to compile an array variable initialization with an array literal and a UDA #22397

Description

@programandala-net

After upgrading DMD from v2.111.0 to v2.112.0 (on Debian 13.2, x86_64) I have found an issue, which I have isolated in the following code snippet:

void main()
{
	enum var = true;
	@var string[] list = ["A", "B", "C"];
}

v2.111.0 compiles the code as expected but v2.112.0 halts with the following message:

Internal Error: array literal ["A", "B", "C"] (...) should have been lowered to a _d_arrayliteralTX template

Removing the var UDA fixes the problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions