Fix printing of rest argument types in TR

This was a regression that snuck in with pretty printing

original commit: 739f236da363c5f63c72e892aa841f012d567cd9
This commit is contained in:
Asumu Takikawa 2014-02-04 16:18:06 -05:00
parent 53894e3bc9
commit bee2da86df
2 changed files with 4 additions and 1 deletions

View File

@ -222,7 +222,7 @@
(format "~a ~a" k (type->sexp t))
(format "[~a ~a]" k (type->sexp t)))]))
(if rest
(list rest (if (special-dots-printing?) '...* '*))
(list (type->sexp rest) (if (special-dots-printing?) '...* '*))
null)
(if drest
(if (special-dots-printing?)

View File

@ -71,6 +71,9 @@
(check-prints-as? (-> -Input-Port (make-Values (list (-result -String (-FS -top -bot) -no-obj)
(-result -String (-FS -top -bot) -no-obj))))
"(Input-Port -> (values (String : (Top | Bot)) (String : (Top | Bot))))")
;; this case tests that the Number union is printed with its name
;; rather than its expansion (a former bug)
(check-prints-as? (->* '() -Number -Void) "(Number * -> Void)")
(check-prints-as? (->key Univ -Pathlike
#:exists
(one-of/c 'error 'append 'update 'replace