Add support for contracts on non-returning functions with filters.
original commit: b67c3272dc34147a907623c9723187952e333ff5
This commit is contained in:
parent
0e02a31e85
commit
8005c6be2f
|
@ -17,6 +17,7 @@
|
|||
racket/dict
|
||||
unstable/list
|
||||
unstable/sequence
|
||||
(types abbrev)
|
||||
(static-contracts instantiate optimize structures combinators)
|
||||
;; TODO make this from contract-req
|
||||
(prefix-in c: racket/contract)
|
||||
|
@ -514,6 +515,9 @@
|
|||
;; functions with no filters or objects
|
||||
[(arr: dom (Values: (list (Result: rngs (FilterSet: (Top:) (Top:)) (Empty:)) ...)) rst drst kws)
|
||||
(convert-arr a)]
|
||||
;; Functions that don't return
|
||||
[(arr: dom (Values: (list (Result: (== -Bottom) _ _) ...)) rst drst kws)
|
||||
(convert-arr a)]
|
||||
;; functions with filters or objects
|
||||
[(arr: dom (Values: (list (Result: rngs _ _) ...)) rst drst kws)
|
||||
(if (from-untyped? typed-side)
|
||||
|
|
|
@ -80,6 +80,7 @@
|
|||
(t (-polydots (a) (->... (list) (a a) -Symbol)))
|
||||
|
||||
(t (-mu x (-Syntax x)))
|
||||
(t (-> (-> Univ -Bottom : -bot-filter) -Bottom : -bot-filter))
|
||||
|
||||
|
||||
(t/fail ((-poly (a) (-vec a)) . -> . -Symbol)
|
||||
|
|
Loading…
Reference in New Issue
Block a user