jak-project/test/goalc/source_templates/with_game/test-forward-declared-method.gc
water111 9fdbc2d974
[goalc] fix static array length (#836)
* fix static array length

* add some more small fixes
2021-09-08 18:49:49 -04:00

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))
)