this shouldn't change anything: the order we match cases may change efficiency, but it shouldn't change the result in cases like this.
But inspecting the generated python code it is definitely wrong. The bug seems to be with python generation and not the Matchless AST since that is used for the interpretter tests which pass in both cases.
The cmp_BinNat expression is simple enough, but clearly miscompiled when the order isn't starting with Zero.
see the diff here:
https://github.com/johnynek/bosatsu/pull/1176/commits/d32020f178de4e87fec06256c213aa4d6546d82f
this shouldn't change anything: the order we match cases may change efficiency, but it shouldn't change the result in cases like this.
But inspecting the generated python code it is definitely wrong. The bug seems to be with python generation and not the Matchless AST since that is used for the interpretter tests which pass in both cases.
The cmp_BinNat expression is simple enough, but clearly miscompiled when the order isn't starting with Zero.