Guards are skipped by pattern matching
In the following example, we would want a type pattern error.
int div (int x, int y) | _neq_SxS_ (y, 0)
{
return _div_SxS_ (x, y);
}
int main()
{
return div (4, 0);
}
However, pattern matching skips guards, instead resulting in SCSprf_div_XxS: Division by zero encountered
We should not skip over guards, so that the error message(s) can be generated by type patterns instead.