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