August 25 [Issue 24720] New: Can't alias __traits(getMember) | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=24720 Issue ID: 24720 Summary: Can't alias __traits(getMember) Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: critical Priority: P1 Component: dmd Assignee: nobody@puremagic.com Reporter: turkeyman@gmail.com This is unexpected and extremely inconvenient: struct T { void myFun(int x) {} } T instance; void test() { __traits(getMember, instance, "myFun")(10); // no problem alias fun = __traits(getMember, instance, "myFun"); fun(10); // error: please god, fix me } -- |
Copyright © 1999-2021 by the D Language Foundation