groworld/plant-eyes/test-scripts/classtest.scm
2009-09-28 09:57:29 +01:00

21 lines
No EOL
360 B
Scheme

#lang scheme
(define testy%
(class object%
(init-field (a 0))
(define/public (m) (display a)(newline))
(super-new)))
(define testy2%
(class testy%
(inherit-field a)
(field (b a))
(define/public (mm) (display a)(display b) (newline))
(super-new)))
(define t (make-object testy2% 100))
(send t m)
(send t mm)