Fix source location in errors reported by define/match
This commit is contained in:
parent
57e787eec2
commit
dc9aa8a569
|
@ -55,3 +55,9 @@
|
||||||
|
|
||||||
(check-equal? (list-fun '(1 2 3)) #t)
|
(check-equal? (list-fun '(1 2 3)) #t)
|
||||||
(check-equal? (list-fun '(4 5 6)) #f)
|
(check-equal? (list-fun '(4 5 6)) #f)
|
||||||
|
|
||||||
|
(check-exn
|
||||||
|
#px"^define/match: no matching clause for #f$"
|
||||||
|
(λ ()
|
||||||
|
(define/match (f x))
|
||||||
|
(f #f)))
|
||||||
|
|
|
@ -170,7 +170,7 @@
|
||||||
(define-syntax (define/match stx)
|
(define-syntax (define/match stx)
|
||||||
(syntax-parse stx
|
(syntax-parse stx
|
||||||
[(_ ?header:function-header ?clause ...)
|
[(_ ?header:function-header ?clause ...)
|
||||||
(template
|
(quasitemplate
|
||||||
(define ?header
|
(define ?header
|
||||||
(match* (?? ?header.params)
|
(match*/derived (?? ?header.params) #,stx
|
||||||
?clause ...)))])))))
|
?clause ...)))])))))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user