https://issues.dlang.org/show_bug.cgi?id=21252
Issue ID: 21252
Summary: parameters inherit function UDAs
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
```
enum A;
enum B;
static if (is(typeof(& func) Fsym : Fsym*)) {
static if (is(Fsym P == function)) {
static assert(__traits(getAttributes, P[0 .. 1]).length == 1);
static assert(is(__traits(getAttributes, P[0 .. 1])[0] == A));
}
}
@A
void func(@B int) {}
```
The first parameter appears to have both @A and @B applied to it. I would only
expect @B.
Note that the second assert will fail until issue #21251 is fixed.
--