fix bug in the ->i parser (picked up the wrong identifier; wrote #'id when

id wasn't really around anywhere)

closes PR 12829
This commit is contained in:
Robby Findler 2012-06-07 10:44:24 -05:00
parent 0f346601f4
commit 41a890df03
2 changed files with 9 additions and 1 deletions

View File

@ -297,7 +297,7 @@ code does the parsing and validation of the syntax.
[[_ (id2 ...) ctc]
(begin
(for-each (λ (x) (check-id stx x)) (syntax->list #'(id2 ...)))
(list (eres #'id (syntax->list #'(id2 ...)) #'ctc (car (generate-temporaries '(eres))))))]
(list (eres #'_ (syntax->list #'(id2 ...)) #'ctc (car (generate-temporaries '(eres))))))]
[[id (id2 ...) ctc]
(begin
(check-id stx #'id)

View File

@ -12642,6 +12642,14 @@ so that propagation occurs.
'pos
'neg))))
(ctest '("the _ result of")
extract-context-lines
(λ () ((contract (->i ([x integer?]) [_ (x) (<=/c x)])
add1
'pos
'neg)
1)))
(ctest '("the a argument of")
extract-context-lines
(λ () ((contract (->i ([a integer?] #:b [b integer?]) ([c integer?] #:d [d integer?]) any)