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.
In the future we should investigate whether we actually ever want to skip over guards (be they type pattern guards, or conformity checks). However for now we will only exclude the F_guard case.
Closes #2376 (closed)