[m-users.] Changes to require complete switch
Julien Fischer
jfischer at opturion.com
Sun Jan 10 17:00:42 AEDT 2021
Hi,
On Sat, 9 Jan 2021, Charlie McGee wrote:
> I'm just getting back into things, and I'm noticing that 'require
> complete switch' no longer allows if then else chains instead of or
> branches. It makes sense, to a degree, if then chains aren't a true
> switch conceptually (?). I'm just curious as to when the change
> happened, as the compiler used to let me get away with that.
It was part of the 20.01 release, from the NEWS for that release:
* We have changed the meaning of `require_complete_switch` scopes
slightly the compiler now generates an error if the goal inside the scope
is not a switch on the named variable.
The change itself was made back in 2016:
<http://lists.mercurylang.org/archives/developers/2016-April/016562.html>
Julien.
More information about the users
mailing list