defclass1.scm 392 B

1234567891011121314151617181920
  1. (define-simple-class A ()
  2. ((get-some-func) ::int 3))
  3. (define-class B ()
  4. ((get-some-func) ::int 4)
  5. ((not-get-func) ::int 5))
  6. (display (A):some-func) (newline)
  7. ;; Output: 3
  8. (display ((A):get-some-func)) (newline)
  9. ;; Output: 3
  10. (display (B):some-func) (newline)
  11. ;; Output: 4
  12. (display ((B):get-some-func)) (newline)
  13. ;; Output: 4
  14. (display ((B):not-get-func)) (newline)
  15. ;; Output: 5