Closed watashi closed 5 months ago
Retrie may produce incorrect code due to missing parentheses in some cases. This is actually covered by an existing test case:
https://github.com/facebookincubator/retrie/blob/main/tests/inputs/Parens.test#L24-L26
-baz2 = foo * bar +baz2 = (3 + 4) * 5 * foo
while this example seems to be correct, note that we don't have the knowledge that (*) is associative. If we update the test case with quot, we will see obvious wrong result (see #68):
(*)
quot
-baz2 = foo `quot` bar +baz2 = (3 + 4) `quot` 5 `quot` foo
Retrie may produce incorrect code due to missing parentheses in some cases. This is actually covered by an existing test case:
https://github.com/facebookincubator/retrie/blob/main/tests/inputs/Parens.test#L24-L26
while this example seems to be correct, note that we don't have the knowledge that
(*)
is associative. If we update the test case withquot
, we will see obvious wrong result (see #68):