Skip to content

Fix #23908 - ICE: new of an enum with an associative array base type - #23910

Open
dkorpel wants to merge 2 commits into
dlang:masterfrom
dkorpel:fix-23908
Open

dkorpel wants to merge 2 commits into
dlang:masterfrom
dkorpel:fix-23908

Conversation

@dkorpel

@dkorpel dkorpel commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

No description provided.

…e type

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@dkorpel dkorpel added the Backport:v2.114 Cherry-pick this PR onto the v2.114 release branch label Sep 23, 2026
@rainers

rainers commented Sep 23, 2026

Copy link
Copy Markdown
Member

staticaa.d expects all code to be safe, but there is a nasty cast in _d_newAA, that needs to be trusted:

V[K] _d_aaNew(K, V)()
{
    auto impl = new Impl!(K,V)(INIT_NUM_BUCKETS);
    return () @trusted { return *cast(V[K]*)&impl; }();
}

@rainers rainers left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix LGTM

@rainers

rainers commented Sep 23, 2026 •

Copy link
Copy Markdown
Member

The failure of runnable\b10562.d shows an ambiguity with promoting values into all elements of an array...
Oops, wrong PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Backport:v2.114 Cherry-pick this PR onto the v2.114 release branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants