First of all, it fixes a bug in which we forgot to add in default arguments when calling _get_problem_arg. This meant that in practice, if you had a default argument, then the very first argument would be what is reported.
Second, it rearranges things into a couple of extra stack frames, for an easier debugging experience.
When looking at the main error message, this will now occur on the line that actually raised it, and not the finally: pop_stack_memo() line.
The argument-specific _get_problem_arg error is what is now attached as the cause, rather than the overall failure of the whole typechecking.
This commit does two things.
First of all, it fixes a bug in which we forgot to add in default arguments when calling
_get_problem_arg
. This meant that in practice, if you had a default argument, then the very first argument would be what is reported.Second, it rearranges things into a couple of extra stack frames, for an easier debugging experience.
finally: pop_stack_memo()
line._get_problem_arg
error is what is now attached as the cause, rather than the overall failure of the whole typechecking.