htdp
htdp copied to clipboard
stepper fails for unbound id in test position of check-expect
To reproduce:
- Set language level to Beginner
- put this program in defns window:
(check-expect (f (list 4)) (list 4 13)) (check-expect (f (list 4)) (list 7 13))
Click Step.
See this error:
recon-source: no matching clause for syntax: (quote-syntax f)
Looks like in this case the reconstructed source contains a quote-syntax.
This bug has been present since at least Racket 7.4.
The test engine recently fixed the source location of syntax errors in check-expects (#152). Is it related or is the bug exposed by that?
perhaps indirectly. I think the issue here is that the reconstructor is just blindsided by the appearance of a quote-syntax, which suggests that it has to do with the expansion of the test forms. Could be related, though. Programming is complicated....
perhaps indirectly. I think the issue here is that the reconstructor is just blindsided by the appearance of a quote-syntax, which suggests that it has to do with the expansion of the test forms.
The expansion of tests forms certainly did change, but there's no (obvious) quote-syntax sitting there. (And the macros stepper refuses to work in the presence of undefined variables, AFAICS.)
The relevant macro is here, if that helps:
https://github.com/racket/htdp/blob/fc6c2c264179b14fa6cb9ecb1ccdfd69df03a757/htdp-lib/test-engine/syntax.rkt#L29