fix: allow missing fields in object/c-common-fields-stronger?
Change `object/c-common-fields-stronger?` to only compare the fields common to both objects.
This commit is contained in:
parent
8ec3edaa95
commit
a539825dc9
|
@ -453,6 +453,9 @@
|
|||
(ctest #t contract-stronger?
|
||||
(object/c (field (f (<=/c 4))))
|
||||
(object/c (field (f (<=/c 4)))))
|
||||
(ctest #t contract-stronger?
|
||||
(object/c (field (f (<=/c 4))))
|
||||
(object/c))
|
||||
(ctest #t contract-stronger?
|
||||
(object/c (m (-> any/c (<=/c 3)))
|
||||
(n (-> any/c any/c)))
|
||||
|
|
|
@ -1641,6 +1641,7 @@
|
|||
(names-sel this))
|
||||
(for/and ([this-name (in-list (names-sel this))]
|
||||
[this-ctc (in-list (ctcs-sel this))])
|
||||
(or (not (member this-name (names-sel that)))
|
||||
(for/or ([that-name (in-list (names-sel that))]
|
||||
[that-ctc (in-list (ctcs-sel that))])
|
||||
(and (equal? this-name that-name)
|
||||
|
@ -1650,7 +1651,7 @@
|
|||
this-ctc)
|
||||
(if (just-check-existence? that-ctc)
|
||||
any/c
|
||||
that-ctc)))))))
|
||||
that-ctc))))))))
|
||||
|
||||
(define-struct base-object/c (methods method-contracts fields field-contracts)
|
||||
#:property prop:custom-write custom-write-property-proc
|
||||
|
|
Loading…
Reference in New Issue
Block a user