mirror of
https://github.com/open-goal/jak-project.git
synced 2024-10-20 21:27:52 -04:00
9fdbc2d974
* fix static array length * add some more small fixes
35 lines
566 B
Common Lisp
35 lines
566 B
Common Lisp
|
|
|
|
(deftype test-parent-type (basic)
|
|
()
|
|
(:methods
|
|
(test-method (_type_) int)
|
|
)
|
|
)
|
|
|
|
(defmethod test-method test-parent-type ((obj test-parent-type))
|
|
4
|
|
)
|
|
|
|
(declare-type test-child-type test-parent-type)
|
|
|
|
|
|
(defun test-method-call ((obj test-child-type))
|
|
(test-method obj)
|
|
)
|
|
|
|
|
|
|
|
(deftype test-child-type (test-parent-type)
|
|
()
|
|
)
|
|
|
|
(defmethod test-method test-child-type ((obj test-child-type))
|
|
12
|
|
)
|
|
|
|
|
|
(format #t "~d ~d~%"
|
|
(test-method (new 'static 'test-parent-type))
|
|
(test-method-call (new 'static 'test-child-type))
|
|
) |