Simplify fix for PR 14030
Please merge into 6.0 original commit: 6a787c963f22d563a67b731914ac204e2e051ebb
This commit is contained in:
parent
82fa4808d6
commit
f785630a76
|
@ -262,18 +262,18 @@ This file defines two sorts of primitives. All of them are provided into any mod
|
|||
(if (Error? typ)
|
||||
;; This code should never get run, typechecking will have an error earlier
|
||||
#`(error 'make-predicate "Couldn't parse type")
|
||||
#`(let ()
|
||||
(ann
|
||||
#,(ignore-some-property
|
||||
(type->contract
|
||||
typ
|
||||
;; must be a flat contract
|
||||
#:kind 'flat
|
||||
;; the value is not from the typed side
|
||||
#:typed-side #f
|
||||
(type->contract-fail typ #'ty #:ctc-str "predicate"))
|
||||
#t)
|
||||
(Any -> Boolean : ty))))))]))
|
||||
#`(#%expression
|
||||
(ann
|
||||
#,(ignore-some-property
|
||||
(type->contract
|
||||
typ
|
||||
;; must be a flat contract
|
||||
#:kind 'flat
|
||||
;; the value is not from the typed side
|
||||
#:typed-side #f
|
||||
(type->contract-fail typ #'ty #:ctc-str "predicate"))
|
||||
#t)
|
||||
(Any -> Boolean : ty))))))]))
|
||||
|
||||
(define-syntax (cast stx)
|
||||
(syntax-parse stx
|
||||
|
|
Loading…
Reference in New Issue
Block a user