Skip to content

Commit e044af6

Browse files
dkorpelclaude
authored andcommitted
Fix #23021 - getOverloads indexed result .mangleof caused assertion failure
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 6b2b510 commit e044af6

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

compiler/src/dmd/expressionsem.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15776,7 +15776,7 @@ private Expression dotIdSemanticPropX(DotIdExp exp, Scope* sc)
1577615776
}
1577715777

1577815778
if (!hasOverloads)
15779-
e = StringExp.create(loc, mangleExact(f));
15779+
e = StringExp.create(loc, mangleExact(f.toAliasFunc()));
1578015780
}
1578115781

1578215782
if (!e)
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// https://github.com/dlang/dmd/issues/23021
2+
// getOverloads indexed result .mangleof caused assertion failure
3+
4+
class A { void func() const {} }
5+
static assert(__traits(getOverloads, A, "func")[0].mangleof.length > 0);

0 commit comments

Comments
 (0)