Re: Should getSymbolsByUDA work with member variables?

2020-02-29 Thread Steven Schveighoffer via Digitalmars-d-learn
On 2/28/20 1:34 PM, cc wrote: This compiles: class Foo { int x; @(1) void y() {} this() {     static foreach (idx, field; getSymbolsByUDA!(Foo, 1)) {     } } } This does not: class Foo { @(1) int x; void y() {} this() {     static foreach

Re: Should getSymbolsByUDA work with member variables?

2020-02-28 Thread Basile B. via Digitalmars-d-learn
On Friday, 28 February 2020 at 18:34:08 UTC, cc wrote: This compiles: class Foo { int x; @(1) void y() {} this() { static foreach (idx, field; getSymbolsByUDA!(Foo, 1)) { } } } This does not: class Foo { @(1) int x;

Should getSymbolsByUDA work with member variables?

2020-02-28 Thread cc via Digitalmars-d-learn
This compiles: class Foo { int x; @(1) void y() {} this() { static foreach (idx, field; getSymbolsByUDA!(Foo, 1)) { } } } This does not: class Foo { @(1) int x; void y() {} this() { static