Tests of super contracts. Failing test here, because we're not checking for
non-final public methods when adding super (or later, override) contracts. We should check for that in both cases, as the contract suggests that the method in question is overrideable. svn: r18160
This commit is contained in:
parent
0971d37b70
commit
7abafad8b1
|
@ -4103,11 +4103,39 @@
|
||||||
'neg))
|
'neg))
|
||||||
|
|
||||||
(test/spec-passed
|
(test/spec-passed
|
||||||
'class/c-first-order-4
|
'class/c-first-order-5
|
||||||
'(contract (class/c (field [n number?]))
|
'(contract (class/c (field [n number?]))
|
||||||
(class object% (super-new) (field [n 3]))
|
(class object% (super-new) (field [n 3]))
|
||||||
'pos
|
'pos
|
||||||
'neg))
|
'neg))
|
||||||
|
|
||||||
|
(test/pos-blame
|
||||||
|
'class/c-first-order-6
|
||||||
|
'(contract (class/c (super [m (-> any/c number? number?)]))
|
||||||
|
object%
|
||||||
|
'pos
|
||||||
|
'neg))
|
||||||
|
|
||||||
|
(test/pos-blame
|
||||||
|
'class/c-first-order-7
|
||||||
|
'(contract (class/c (super [m (-> any/c number? number?)]))
|
||||||
|
(class object% (super-new) (define/pubment (m x) (add1 x)))
|
||||||
|
'pos
|
||||||
|
'neg))
|
||||||
|
|
||||||
|
(test/pos-blame
|
||||||
|
'class/c-first-order-7
|
||||||
|
'(contract (class/c (super [m (-> any/c number? number?)]))
|
||||||
|
(class object% (super-new) (define/public-final (m x) (add1 x)))
|
||||||
|
'pos
|
||||||
|
'neg))
|
||||||
|
|
||||||
|
(test/spec-passed
|
||||||
|
'class/c-first-order-8
|
||||||
|
'(contract (class/c (super [m (-> any/c number? number?)]))
|
||||||
|
(class object% (super-new) (define/public (m x) (add1 x)))
|
||||||
|
'pos
|
||||||
|
'neg))
|
||||||
|
|
||||||
;
|
;
|
||||||
;
|
;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user