Add a unit test for ill-typed private methods

original commit: 7ba8dd57cbffe66bb76cab053fed6e80cc193693
This commit is contained in:
Asumu Takikawa 2013-07-01 18:28:06 -04:00
parent fd9c06e10f
commit 707de1ef68

View File

@ -443,6 +443,12 @@
(: m (-> Integer))
(define/public (m) (x))))
;; fails, ill-typed private method implementation
(check-err
(class: object% (super-new)
(: x (-> Integer))
(define/private (x) "bad result")))
;; test optional init arg
(check-ok
(: c% (Class (init [x Integer #:optional])))