Code from February thread: http://www.digitalmars.com/d/archives/digitalmars/D/Possible_UDA_bug_190800.html
import std.stdio;
int x;
@(write(x++),writeln()) void foo(){}
@safe pure void main(){
__traits(getAttributes, foo);
__traits(getAttributes, foo)[0];
__traits(getAttributes, foo)[0];
//write(x++), writeln(); // Error: ...
}
By the way, irrespective of attributes, the issue raised in the thread regarding validity of code above should be at least documented (or code rejected if considered to be a bug).