Fixed support for valuesdots with let/ec.

This commit is contained in:
J. Ian Johnson 2014-06-22 19:37:30 -04:00 committed by Sam Tobin-Hochstadt
parent 878d4cfb4d
commit d35f41728c
2 changed files with 6 additions and 4 deletions

View File

@ -63,10 +63,8 @@
#:with ann-name (type-label-property
#'name
(syntax-parse #'ty
[((~or :Values^ :values^) tys ... dty :ddd/bound)
#'(tys ... dty -> (U))]
[((~or :Values^ :values^) tys ... dty _:ddd)
#'(tys ... dty -> (U))]
[((~or :Values^ :values^) tys ... dty b:ddd)
#'(tys ... dty b -> (U))]
[((~or :Values^ :values^) tys ...)
#'(tys ... -> (U))]
[t #'(t -> (U))]))))

View File

@ -18,3 +18,7 @@
((inst call/ec Integer Integer Integer) (lambda ([f : (Integer Integer -> Nothing)]) (f 0 1)))
(let/cc k : (values String Symbol Boolean)
(+ 5 (k "result arity doesn't matter" 'hahaha #t)))
(: r : (All (a b ...) (-> a b ... b (values a b ... b))))
(define (r A . bs) (let/ec break : (values a b ... b) (apply break A bs)))
(r 0 1 2 3 4 5)