added empty as a coerceable value

svn: r12025
This commit is contained in:
Robby Findler 2008-10-13 21:09:18 +00:00
parent d3e26ef74d
commit 2ef287f107
2 changed files with 2 additions and 1 deletions

View File

@ -145,7 +145,7 @@
[(contract? x) x]
[(and (procedure? x) (procedure-arity-includes? x 1))
(make-predicate-contract (or (object-name x) '???) x)]
[(or (symbol? x) (boolean? x) (char? x)) (make-eq-contract x)]
[(or (symbol? x) (boolean? x) (char? x) (null? x)) (make-eq-contract x)]
[(or (bytes? x) (string? x)) (make-equal-contract x)]
[(number? x) (make-=-contract x)]
[(or (regexp? x) (byte-regexp? x)) (make-regexp/c x)]

View File

@ -4540,6 +4540,7 @@ so that propagation occurs.
(test-flat-contract #rx#".x." #"axq" #"x")
(test-flat-contract #rx".x." #"axq" #"x")
(test-flat-contract #rx#".x." "axq" "x")
(test-flat-contract ''() '() #f)
(test/spec-passed 'any/c '(contract any/c 1 'pos 'neg))
(test-flat-contract 'printable/c (vector (cons 1 (box #f))) (lambda (x) x))