sva47412.scm 213 B

123456789101112131415
  1. (define-simple-class A ()
  2. ((*init* x) #!void)
  3. )
  4. (define-simple-class B (A)
  5. ((*init* x)
  6. (invoke-special A (this) '*init* x)
  7. (define i 2)
  8. (format #t "x:~w i:~w~%" x i)
  9. )
  10. )
  11. (make B 12)
  12. ;; Output: x:12 i:2