Add missing contract generation error cases
Functions with dotted values or AnyValues in the return type aren't yet supported for contract generation. Related to PR 14894
This commit is contained in:
parent
9fe834d35c
commit
643c20afdb
|
@ -586,7 +586,13 @@
|
|||
(if (from-untyped? typed-side)
|
||||
(fail #:reason (~a "cannot generate contract for function type"
|
||||
" with filters or objects."))
|
||||
(convert-arr a))]))
|
||||
(convert-arr a))]
|
||||
[(arr: dom (? ValuesDots?) rst drst kws)
|
||||
(fail #:reason (~a "cannot generate contract for function type"
|
||||
" with dotted return values"))]
|
||||
[(arr: dom (? AnyValues?) rst drst kws)
|
||||
(fail #:reason (~a "cannot generate contract for function type"
|
||||
" with unknown return values"))]))
|
||||
(define arities
|
||||
(for/list ([t arrs])
|
||||
(match t
|
||||
|
|
|
@ -160,6 +160,12 @@
|
|||
(t/fail (-> (-polydots (a) (->... (list) (a a) -Symbol)) Univ)
|
||||
"cannot generate contract for variable arity polymorphic type")
|
||||
|
||||
;; PR 14894 - FIXME: the polydots case may be possible for typed functions
|
||||
(t/fail (-polydots (a) (->... (list) (a a) (make-ValuesDots null a 'a)))
|
||||
"dotted return values")
|
||||
(t/fail (-> ManyUniv)
|
||||
"unknown return values")
|
||||
|
||||
(t/fail
|
||||
(make-Function
|
||||
(list (make-arr* (list) -Boolean #:kws (list (make-Keyword '#:key Univ #f)))
|
||||
|
|
Loading…
Reference in New Issue
Block a user