allow 'contract' to use #f for the positive
name, but still disallow #f at the blame record level closes PR 14387
This commit is contained in:
parent
8cbcba8ed2
commit
4d94ef91cf
|
@ -48,6 +48,9 @@
|
|||
[rename five chaperone-five chaperone-blame-ok/c]
|
||||
[rename five flat-five flat-blame-ok/c]))))
|
||||
|
||||
(test/no-error
|
||||
'(contract string? "string" #f 'neg))
|
||||
|
||||
(begin
|
||||
(test/no-error
|
||||
'(dynamic-require ''blame-ok-dynamic 'impersonator-five))
|
||||
|
|
|
@ -53,7 +53,15 @@
|
|||
(make-blame (build-source-location loc)
|
||||
name
|
||||
(λ () (contract-name c))
|
||||
pos
|
||||
|
||||
;; hack! We need to allow pos = #f for backwards
|
||||
;; compatibility, but we cannot put #f into the
|
||||
;; blame struct now because #f means that the
|
||||
;; name is not known. Since #f is not a very good
|
||||
;; name, we'll just put something stupid here
|
||||
;; instead of changing the library around.
|
||||
(or pos "false")
|
||||
|
||||
(if cvfp #f neg)
|
||||
#t))
|
||||
(define new-val
|
||||
|
|
Loading…
Reference in New Issue
Block a user