D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 17648 - dmd segfault on overload set introspection
Summary: dmd segfault on overload set introspection
Status: RESOLVED WORKSFORME
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P1 major
Assignee: No Owner
URL:
Keywords: ice
Depends on:
Blocks:
 
Reported: 2017-07-13 16:53 UTC by John Colvin
Modified: 2020-03-21 03:56 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description John Colvin 2017-07-13 16:53:07 UTC
$ cat blah.d
alias BS = BSA;
alias BS = BSB;

template BSA(alias T)
{
}

template BSB(T)
{
}

void foo()
{
    void bar(alias composite)()
    {
        foreach (member; __traits(allMembers, composite))
            enum a = __traits(compiles, __traits(getMember, composite, member));
    }

    bar!blah;
}


segfaults in resolvePropertiesOnly, no idea why it would end up there. I initially thought it was to do with recursing on the same module, but it turns out that it still happens if you take foo to another module.
Comment 1 uplink.coder 2017-07-13 16:56:00 UTC
resolve properties is needed to check if we have a such a member.

I'll have a look into this later.
Comment 2 basile-z 2019-05-30 19:33:37 UTC
works since 2.082 (https://run.dlang.io/is/xWNPg6)