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.
That's a forward ref not detected. If you put the enum decl after foo() overloads it exits with a normal program error.
@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
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
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