Bug 23082 – stringof of template alias overloaded with function accessed by trait: segfault.

Status
RESOLVED
Resolution
FIXED
Severity
critical
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2022-05-03T07:57:42Z
Last change time
2022-07-09T16:31:54Z
Keywords
ice, pull
Assigned to
No Owner
Creator
FeepingCreature

Comments

Comment #0 by default_357-line — 2022-05-03T07:57:42Z
$ cat test.d void foo()() {} alias bar = foo; void bar() { } void main() { __traits(getMember, __traits(parent, main), "bar").stringof; } $ dmd test.d Segmentation fault
Comment #1 by default_357-line — 2022-05-03T08:10:24Z
Further reduced: ... __traits(parent, main).bar.stringof; ... Afaics at first glance, the problem is that mod.bar forms a DotIdExp, but doesn't have a type.
Comment #2 by dlang-bot — 2022-05-20T09:13:31Z
@RazvanN7 created dlang/dmd pull request #14149 "Fix Issue 23082 - stringof of template alias overloaded with function accessed by trait: segfault." fixing this issue: - Fix Issue 23082 - stringof of template alias overloaded with function accessed by trait: segfault. https://github.com/dlang/dmd/pull/14149
Comment #3 by dlang-bot — 2022-05-20T11:19:34Z
dlang/dmd pull request #14149 "Fix Issue 23082 - stringof of template alias overloaded with function accessed by trait: segfault." was merged into stable: - 1e788a4370098a77c5d3e80c9cae91429cc439b5 by RazvanN7: Fix Issue 23082 - stringof of template alias overloaded with function accessed by trait: segfault. https://github.com/dlang/dmd/pull/14149
Comment #4 by dlang-bot — 2022-07-09T16:31:54Z
dlang/dmd pull request #14280 "merge stable" was merged into master: - cf80ca9d4b4e99db30d2644706ecbddc8f79cd49 by Razvan Nitu: Fix Issue 23082 - stringof of template alias overloaded with function accessed by trait: segfault. (#14149) https://github.com/dlang/dmd/pull/14280