On 9/29/12, David Piepgrass <[email protected]> wrote: > I like the spirit of this feature, but as Alex pointed out, > ambiguity is possible (which could theoretically cause errors in > existing code)
It could also cause subtle problems because enum values are implicitly
convertible to the enum's base type. Take this for example:
void test(bool state) { }
enum Foo { no, yes }
class Class
{
enum Bar { yes, no }
void test() { .test(no); } // pass Foo.no (true) or Bar.no (false) ?
}
