Fix tc-results->values and filter-tc-results to handle polydots.

original commit: 88af96f19a340e4d6ac72a736456a3ec91354bc4
This commit is contained in:
Eric Dobson 2014-03-09 11:21:50 -07:00
parent ef84da32f6
commit ccf7d79d27
3 changed files with 11 additions and 2 deletions

View File

@ -174,7 +174,8 @@
(define (tc-results->values tc)
(match tc
[(tc-any-results:) ManyUniv]
[(tc-results: ts) (-values ts)]))
[(tc-results: ts) (-values ts)]
[(tc-results: ts _ _ dty dbound) (-values-dots ts dty dbound)]))
(define/cond-contract (resolve atoms prop)
((listof Filter/c)

View File

@ -209,4 +209,9 @@
[(tc-results: ts _ _)
(ret ts
(for/list ([f (in-list ts)]) -no-filter)
(for/list ([f (in-list ts)]) -no-obj))]))
(for/list ([f (in-list ts)]) -no-obj))]
[(tc-results: ts _ _ dty dbound)
(ret ts
(for/list ([f (in-list ts)]) -no-filter)
(for/list ([f (in-list ts)]) -no-obj)
dty dbound)]))

View File

@ -2448,6 +2448,9 @@
;; make sure no-binding cases like the middle expression are checked
[tc-err (let () (define r "r") (string-append r 'foo) (define x "x") "y")
#:msg "expected: String.*given: 'foo"]
[tc-err (ann (lambda () (let ([my-values values]) (my-values)))
(All (A ...) (-> (Values Symbol ... A))))]
)
(test-suite
"tc-literal tests"