The following code will produce an error, even though the ambiguity could be resolved.
enum MyEnum1
{
cYes,
cNo
}
enum MyEnum2
{
cNo,
cYes
}
bool main()
{
MyEnum1 e = cNo;
return e == cYes;
}
I have attached a patch that resolves the ambiguity.