Matching enums is more limited after multiple enum value changes
Originally posted on our forums: https://www.eclipse.org/forums/index.php/t/1116860/
With the implementation of enumerated items with multiple possible values (#633 (closed)) the compiler has more difficulties determining the types of the operands of 'match' operations.
Example:
type enumerated Enum { e1, e2 };
function f(boolean b) return Enum {
if (b) { return e1; }
else { return e2; }
}
...
if (match(f(true), e1)) {
...
In this case the compiler can't determine whether its operands are references or enum items. This was not an issue in version 10.1.1, because 'f(true)' was clearly a reference to a function call, but now it can also be an enum item with multiple possible values.
/cc @aknappqwt @mmagyari