Before, else if statements were accidentally processed in the wrong order. The first case, the if case, would be evaluated, then all of the else if branches would be evaluated in reverse order, and then the else case would be evaluated. This has been fixed by reversing the else if cases when they are assembled into if else statements.
Additionally, I discovered that the arguments of function calls were not being typechecked. I have no idea how I let this get through the cracks. I just added typechecks to each argument directly after their types were checked against the function argument types.
Before, else if statements were accidentally processed in the wrong order. The first case, the
if
case, would be evaluated, then all of theelse if
branches would be evaluated in reverse order, and then theelse
case would be evaluated. This has been fixed by reversing the else if cases when they are assembled intoif else
statements.Additionally, I discovered that the arguments of function calls were not being typechecked. I have no idea how I let this get through the cracks. I just added typechecks to each argument directly after their types were checked against the function argument types.