[Issue 21251] New: parameter UDA type not equal to itself
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Sep 16 01:40:42 UTC 2020
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 at puremagic.com
Reporter: elpenguino+D at 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.
--
More information about the Digitalmars-d-bugs
mailing list