[Issue 18194] hasStaticMember doesn't work with static enum

2018-01-05 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18194 --- Comment #4 from Jonathan M Davis --- No, because an enum doesn't get associated with an instance. Like an alias, it's just a scoped declaration. e.g. struct S { enum a = "foo"; static enum b = "bar"; }

[Issue 18194] hasStaticMember doesn't work with static enum

2018-01-05 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18194 --- Comment #3 from FeepingCreature --- I'd expect static-on-enum to influence whether you could do this.member or Class.member. Is this not the case? --

[Issue 18194] hasStaticMember doesn't work with static enum

2018-01-05 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18194 Jonathan M Davis changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 18194] hasStaticMember doesn't work with static enum

2018-01-05 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18194 --- Comment #1 from FeepingCreature --- static assert(hasMember!(X, "b")) does pass, and b shows up in allMembers and derivedMembers. --