https://issues.dlang.org/show_bug.cgi?id=18194
Issue ID: 18194 Summary: hasStaticMember doesn't work with static enum Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: enhancement Priority: P1 Component: phobos Assignee: nob...@puremagic.com Reporter: default_357-l...@yahoo.de Steps to reproduce: class X { static int a; static enum b; } static assert(hasStaticMember!(X, "a")); static assert(hasStaticMember!(X, "b")); What should happen: Both asserts should pass. What happens: The second assert fails. The error occurs because enum hasStaticMember(T, string member) = __traits(compiles, &sym);, and enums don't have an address. --