debug a reserved keyword (even for enums?)

Katastic ckatko at gmail.com
Fri Apr 10 22:37:54 UTC 2026


Hello all, it's been awhile. I have a question. Does it make 
'sense' that debug is a reserved keyword even when its inside an 
enum?

```D
enum loggingLevel {
	none = 0,
	debug, // Error: found `debug` when expecting `identifier`
	info,
	warning,
	error
}
```

Is there anywhere where that would actually clash?
```D
void myFunction(loggingLevel l);
myFunction(loggingLevel.debug);

with(loggingLevel){
myFunction(debug);
}
```

Is 'debug' used anywhere outside of version() statements? Would 
it explode templates or something?

Thanks,


More information about the Digitalmars-d mailing list