use the right identifier

closes #1845
This commit is contained in:
Robby Findler 2017-10-26 16:47:55 -05:00
parent 5f1b707881
commit 259e3a6fe1
2 changed files with 25 additions and 1 deletions

View File

@ -1550,5 +1550,28 @@
'pos 'neg)
1))
"(and/c number? (>/c 1))")
(test/spec-passed/result
'two-underscores
'((contract (->i ([abc any/c] [_ (abc) any/c]) [_ () any/c])
(λ (abc whatevs) whatevs)
'pos 'neg)
441 144)
144)
(test/spec-passed/result
'many-underscores
'(call-with-values
(λ () ((contract (->i ([abc any/c] [_ (abc) any/c])
(values [_ () any/c]
[_ () any/c]
[_ () any/c]
[_ () any/c]))
(λ (abc whatevs)
(values 1 2 3 4))
'pos 'neg)
55 66))
list)
'(1 2 3 4))
)

View File

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