March 12, 2018 context pointer breaks getOverloads, shouldn't it be ignored by it? | ||||
---|---|---|---|---|
| ||||
void main() { class Foo { void fun(){} } foreach(m; __traits(allMembers, Foo)) foreach(sym; __traits(getOverloads, Foo, m)) { } } this fails with: onlineapp.d(9): Error: no property this for type onlineapp.main.Foo onlineapp.d(9): Error: (Foo).this cannot be resolved it works fine if i add a `static if(m != "this")` or alternatively use std.meta.Erase("this", __traits(allMembers, Foo)). |
Copyright © 1999-2021 by the D Language Foundation