digitalmars.D.bugs - [Issue 21251] New: parameter UDA type not equal to itself
- d-bugmail puremagic.com (27/27) Sep 15 2020 https://issues.dlang.org/show_bug.cgi?id=21251
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. --
Sep 15 2020