added a test to make sure struct/dc signals an error when getting an impersonator

contract on an immutable field that has no dependencies
This commit is contained in:
Robby Findler 2012-05-12 07:57:53 -05:00
parent 1a824c2b50
commit 2eb3264b44

View File

@ -9789,6 +9789,15 @@
'pos
'neg)))
(contract-error-test
'struct/dc-imp-nondep-runtime-error
#'(let ()
(struct s (ernie bert))
(struct/dc s [ernie integer?] [bert (new-∀/c 'α)]))
(λ (x)
(and (exn:fail? x)
(regexp-match #rx"expected chaperone" (exn-message x)))))
(contract-error-test
'struct/dc-not-a-field
#'(eval '(let ()