https://issues.dlang.org/show_bug.cgi?id=16321
Dennis <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |ice CC| |[email protected] --- Comment #2 from Dennis <[email protected]> --- Reduced a bit: ``` struct NameAttribute { int delegate() foo; } static NameAttribute getNamedAttribute(alias S)() { return __traits(getAttributes, S)[0]; } struct MyStruct { @NameAttribute({ return 42; }) int a; } void main() { MyStruct m; enum nameAttr = getNamedAttribute!(m.a); } ``` If you remove `static`, you get: ``` Error: need `this` for `getNamedAttribute` of type `pure nothrow @nogc @safe NameAttribute()` ``` --
