mirror of
https://github.com/open-goal/jak-project.git
synced 2024-10-20 21:27:52 -04:00
20 lines
479 B
Plaintext
20 lines
479 B
Plaintext
(test-setup 12 #f)
|
|
|
|
(deftype self-test-type (basic)
|
|
((self self-test-type))
|
|
)
|
|
|
|
(defmethod new self-test-type ((allocation symbol) (type-to-make type))
|
|
(let ((obj (object-new)))
|
|
;; here the register of obj is used both as a "real" pointer and a GOAL pointer in the same instruction.
|
|
;; this is a special case in the emitter.
|
|
(set! (-> obj self) obj)
|
|
obj
|
|
)
|
|
)
|
|
|
|
(let ((temp (new 'global 'self-test-type)))
|
|
(expect-true (eq? temp (-> temp self)))
|
|
)
|
|
|
|
12 |