acton
acton copied to clipboard
Wrong order of witness parameters in generated code.
Acton Version
0.24.1
Steps to Reproduce and Observed Behavior
The bug does not cause any error in the test suite, but note the following def from builtin/builtin_functions.c:
B_Iterator B_zip (B_Iterable wit1, B_Iterable wit2, $WORD iter1, $WORD iter2) {
B_Iterator it1 = wit2->$class->__iter__(wit2,iter1);
B_Iterator it2 = wit1->$class->__iter__(wit1,iter2);
return (B_Iterator)B_IteratorD_zipG_new(it1,it2);
}
Note how wit1 is paired with iter2 and wit2 with iter1; this gives correct behavior since the two wit parameters are generated in the wrong order. Apparently this affects no other code in the test suite, but the problem should be tracked and corrected. Then the above function will be corrected to use the natural order of parameters.
Expected Behavior
Correct parameter order in generated code