[m-dev.] somewhat misleading error message

Zoltan Somogyi zoltan.somogyi at runbox.com
Sun Sep 15 11:58:16 AEST 2024



On Sun, 15 Sep 2024 10:33:02 +1000, Mark Brown <mark at mercurylang.org> wrote:
> Would it be possible to mention in the first message whether the
> determinism was declared or inferred? That's likely to be of
> assistance to users in this situation, which is probably not that
> uncommon (in this case it was because I accidentally re-used a
> variable name).

I just committed a diff that mentions if the determinism being complained
about is inferred. It does not mention if the determinism is declared,
because in that case, there can be no confusion about the origin of the
determinism, and the extra words would just be clutter.

> Alternatively, just suppress the message if the determinism is not
> declared. An error would be reported at the call site instead, which
> may also be confusing, but that's the sort of thing you should expect
> if you eschew declaring the determinism :-)

I think a diagnostic at one context that reports an error that you know
is actually at another context would be much more confusing,
which is why I went with the approach above.

Zoltan.


More information about the developers mailing list