Fix typo in vector contract implementation leading to wrong error message
This commit is contained in:
parent
f2a29515d1
commit
8bc9cef7a9
|
@ -167,5 +167,10 @@
|
|||
(test/pos-blame
|
||||
'vectorof-eager-fail
|
||||
'(contract (vectorof integer? #:eager 5) (vector-immutable 0 "") 'pos 'neg))
|
||||
|
||||
(test/pos-blame
|
||||
'vectorof/mutable-flat
|
||||
'(contract (vectorof integer? #:immutable #f #:flat? #t) (vector-immutable 3) 'pos 'neg))
|
||||
(test/pos-blame
|
||||
'vectorof/mutable-higher-order
|
||||
'(contract (vectorof (-> integer? integer?) #:immutable #f) (vector-immutable add1) 'pos 'neg))
|
||||
)
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
(fail val '(expected "an immutable vector" given: "~e") val))]
|
||||
[(eq? immutable #f)
|
||||
(when (immutable? val)
|
||||
(fail val '(expected "an mutable vector" given: "~e" val)))]
|
||||
(fail val '(expected "an mutable vector" given: "~e") val))]
|
||||
[else (void)])
|
||||
(when first-order?
|
||||
(let loop ([n 0])
|
||||
|
@ -93,7 +93,7 @@
|
|||
(cond
|
||||
[(immutable? val)
|
||||
(raise-blame-error blame #:missing-party neg-party
|
||||
val '(expected "an mutable vector" given: "~e" val))]
|
||||
val '(expected "an mutable vector" given: "~e") val)]
|
||||
[else #f])]
|
||||
[else #f])]
|
||||
[else
|
||||
|
|
Loading…
Reference in New Issue
Block a user