October 15 [Issue 24817] New: UDA on nested template does not work | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=24817 Issue ID: 24817 Summary: UDA on nested template does not work Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nobody@puremagic.com Reporter: default_357-line@yahoo.de Consider this code: @(3) int foo() => 0; static assert(__traits(getAttributes, foo)[0] == 3); @(3) int bar(T)() => 0; static assert(__traits(getAttributes, bar)[0] == 3); void main() { @(3) int ffoo() => 0; static assert(__traits(getAttributes, ffoo)[0] == 3); @(3) int bbar(T)() => 0; static assert(__traits(getAttributes, bbar)[0] == 3); } Leads to: "Error: sequence index `[0]` is outside bounds `[0 .. 0]`" on the last assert only. -- |
Copyright © 1999-2021 by the D Language Foundation