On Saturday, 29 September 2012 at 02:01:15 UTC, Alex Rønne Petersen wrote:
The first issue with this proposal that comes to mind is this:

enum Foo { bar }

void func(Foo f)
{
    // ...
}

// ...

Foo bar = Foo.bar;
func(bar); // ?

Maybe it should simply throw a compile error about the ambiguity of 'bar' in 'func(bar)'. But if the local variable 'bar' if not of Foo type, then there's no ambiguity. Or, if the local variable 'bar' is a compile time constant that evaluates to Foo.bar, then there's no ambiguity either.

Reply via email to