Revert "Check that init args mentioned in contracts are provided."
This reverts commit 27b4df3eb5
.
This commit is contained in:
parent
27b4df3eb5
commit
ab66b485e5
|
@ -3196,8 +3196,6 @@ An example
|
||||||
[handled-args null])
|
[handled-args null])
|
||||||
(cond
|
(cond
|
||||||
[(null? init-args)
|
[(null? init-args)
|
||||||
(unless (null? inits/c)
|
|
||||||
(raise-blame-error bswap #f "initialization argument not provided\n init-arg: ~a" (car (car inits/c))))
|
|
||||||
(reverse handled-args)]
|
(reverse handled-args)]
|
||||||
[(null? inits/c)
|
[(null? inits/c)
|
||||||
(append (reverse handled-args) init-args)]
|
(append (reverse handled-args) init-args)]
|
||||||
|
|
|
@ -8032,13 +8032,6 @@
|
||||||
[d%/c/c (contract (class/c (init [a number?])) d%/c 'pos 'neg)])
|
[d%/c/c (contract (class/c (init [a number?])) d%/c 'pos 'neg)])
|
||||||
(new d%/c/c [a #t] [a "foo"])))
|
(new d%/c/c [a #t] [a "foo"])))
|
||||||
|
|
||||||
;; Check that we catch not providing init args metioned in the contract
|
|
||||||
(test/neg-blame
|
|
||||||
'class/c-higher-order-init-9
|
|
||||||
'(let* ([c% (class object% (super-new) (init [a 3]))]
|
|
||||||
[c%/c (contract (class/c (init [a integer?])) c% 'pos 'neg)])
|
|
||||||
(new c%/c)))
|
|
||||||
|
|
||||||
(test/spec-passed
|
(test/spec-passed
|
||||||
'class/c-higher-order-init-field-1
|
'class/c-higher-order-init-field-1
|
||||||
'(let ([c% (contract (class/c (init-field [f (-> number? number?)]))
|
'(let ([c% (contract (class/c (init-field [f (-> number? number?)]))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user