D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 20692 - Nested alias declarations and getMember trait can crash dmd
Summary: Nested alias declarations and getMember trait can crash dmd
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P1 normal
Assignee: No Owner
URL:
Keywords: pull
Depends on:
Blocks:
 
Reported: 2020-03-21 09:11 UTC by Boris Carvajal
Modified: 2021-04-02 05:45 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Boris Carvajal 2020-03-21 09:11:30 UTC
Test case:
struct S() {
    void fun() {
        gun("");
    }
    void gun(T)(T) {
        alias buggy = bug;
    }
}

alias X = S!();

void main() {
    X().gun(0);
}

alias bug =  __traits(getMember, X, "fun");
Comment 1 Dlang Bot 2020-03-21 09:59:35 UTC
@BorisCarvajal created dlang/dmd pull request #10952 "Fix Issue 20692 - Nested alias declarations and getMember trait can c…" fixing this issue:

- Fix Issue 20692 - Nested alias declarations and getMember trait can crash dmd

https://github.com/dlang/dmd/pull/10952
Comment 2 Dlang Bot 2020-03-31 10:27:32 UTC
dlang/dmd pull request #10952 "Fix Issue 20692 - Nested alias declarations and getMember trait can c…" was merged into stable:

- ef669f8ab65b040075e55f07edea7c138e66ec2e by Boris Carvajal:
  Fix Issue 20692 - Nested alias declarations and getMember trait can crash dmd

https://github.com/dlang/dmd/pull/10952
Comment 3 Dlang Bot 2021-04-02 05:45:28 UTC
dlang/dmd pull request #12339 "[dmd-cxx] Backport fixes and trivial features from upstream dmd" was merged into dmd-cxx:

- 9cbfd4a8700bb840b672aeb08b3ec6cce295c731 by Boris Carvajal:
  [dmd-cxx] Fix Issue 20692 - Nested alias declarations and getMember trait can crash dmd

https://github.com/dlang/dmd/pull/12339