Comment #0 by matti.niemenmaa+dbugzilla — 2006-11-18T12:29:10Z
void main() {
debug = foo;
debug (foo) printf("Foo\n");
}
Errors out with "asdf.d(2): found '=' instead of statement". Replace "foo" with any valid debug identifier or level and the same error occurs.
Comment #1 by smjg — 2006-11-19T06:00:11Z
The documentation is in a mess in terms of where such things are allowed. Currently, the grammar allows DebugSpecification and VersionSpecification it only at module level. But obviously it is supposed to be allowed within a CC block that is at module level. But what about class level or function level?
Comment #2 by bugzilla — 2007-10-04T04:17:58Z
It is a DeclDef, which appears in a module or in an attribute specification. The documentation can be improved, but it isn't wrong. They aren't allowed at function or class scope.