September 16, 2020 [Issue 21251] New: parameter UDA type not equal to itself | ||||
|---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=21251 Issue ID: 21251 Summary: parameter UDA type not equal to itself Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nobody@puremagic.com Reporter: elpenguino+D@gmail.com ``` enum A; static if (is(typeof(& func) Fsym : Fsym*)) { static if (is(Fsym P == function)) { static assert(is(A == A)); //okay static assert(is(__traits(getAttributes, P[0 .. 1])[0] == A)); //wait, what? A != A? } } void func(@A int) {} ``` The static asserts in this code should both pass. Interestingly, DMD 2.084 - 2.091 seem to crash instead of producing any errors. -- | ||||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply