July 04, 2018 [Issue 19056] New: UDAs can be added to imports but not retrieved | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=19056 Issue ID: 19056 Summary: UDAs can be added to imports but not retrieved Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: minor Priority: P1 Component: dmd Assignee: nobody@puremagic.com Reporter: elpenguino+D@gmail.com It is currently legal to attach UDAs to imports, but there's no way to retrieve them. ie: ``` enum X; @X import y = std.stdio; pragma(msg, __traits(getAttributes, y)); ``` I would expect the compiler to either print the attributes or emit an error, not print an empty tuple. -- |
Copyright © 1999-2021 by the D Language Foundation