Based on the bug that was fixed by #262, I was concerned that our handling of unary expressions might also be incorrect. I checked for a test case, and found that we didn't have one (because we didn't have a test containing the string +=), so I wrote the one in this PR. To my pleasant surprise, the test passes - I think our usual type correct algorithm actually handles this case just fine, since there is no special error message for mistakes in unary operator types (as there is for binary operators).
Based on the bug that was fixed by #262, I was concerned that our handling of unary expressions might also be incorrect. I checked for a test case, and found that we didn't have one (because we didn't have a test containing the string
+=
), so I wrote the one in this PR. To my pleasant surprise, the test passes - I think our usual type correct algorithm actually handles this case just fine, since there is no special error message for mistakes in unary operator types (as there is for binary operators).