Bug 19717 – case of segfault due to undetected forward reference

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2019-03-03T23:50:27Z
Last change time
2020-03-21T03:56:37Z
Keywords
ice, pull
Assigned to
No Owner
Creator
elpenguino+D

Comments

Comment #0 by elpenguino+D — 2019-03-03T23:50:27Z
Reduced code: ``` enum bar = __traits(getMember, mixin(__MODULE__), "foo"); auto foo() { return foo(); } void foo(Foo) {} ``` This also prints a misleading error: `Error: cannot overload both property and non-property functions` The error appears to have been introduced after DMD 2.070.2.
Comment #1 by b2.temp — 2019-03-04T06:51:31Z
That's a forward ref not detected. If you put the enum decl after foo() overloads it exits with a normal program error.
Comment #2 by dlang-bot — 2019-03-04T07:05:11Z
@Basile-z created dlang/dmd pull request #9412 "fix issue 19717 - case of segfault due to undetected forward reference" fixing this issue: - fix issue 19717 - case of segfault due to undetected forward reference https://github.com/dlang/dmd/pull/9412
Comment #3 by dlang-bot — 2019-03-04T09:14:28Z
dlang/dmd pull request #9412 "fix issue 19717 - case of segfault due to undetected forward reference" was merged into master: - d621072ebdea4701b179dacb267f5876ad55c734 by Basile Burg: fix issue 19717 - case of segfault due to undetected forward reference https://github.com/dlang/dmd/pull/9412
Comment #4 by dlang-bot — 2019-06-16T20:57:34Z
dlang/dmd pull request #10046 "[dmd-cxx] Backport semanticRun refactoring and recursive semantic SEGV bug fixes" was merged into dmd-cxx: - 9ef5e9ba496a0c07500c78f09464b47b07e57e8a by Basile Burg: fix issue 19717 - case of segfault due to undetected forward reference https://github.com/dlang/dmd/pull/10046