Should getSymbolsByUDA work with member variables?
cc
cc at nevernet.com
Fri Feb 28 18:34:08 UTC 2020
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 (idx, field; getSymbolsByUDA!(Foo, 1)) {
}
}
}
Error: value of `this` is not known at compile time
Is there an equivalent for getSymbolsByUDA for member variables,
or is this a bug?
More information about the Digitalmars-d-learn
mailing list