On Thursday, 21 November 2013 at 16:48:59 UTC, Steve Teale wrote:
Could 'with' be extended to cover enum names do you think? Also a supplementary question - does auto lock out some things like this, are there other examples?
Is this what you mean?
enum Intention
{
EVIL,
NEUTRAL,
GOOD,
SAINTLY,
}
void main()
{
with (Intention)
{
assert(EVIL == 0);
assert(NEUTRAL == 1);
assert(GOOD == 2);
assert(SAINTLY == 3);
}
}
