summaryrefslogtreecommitdiff
path: root/test/gc.pit
diff options
context:
space:
mode:
authorLLLL Colonq <llll@colonq>2026-03-27 17:23:26 -0400
committerLLLL Colonq <llll@colonq>2026-03-27 17:23:26 -0400
commit4b294e47144da00ae4b9568fed39569d187ce07e (patch)
tree179222746330c25fa4f0dfdb03e0fc0a15ad7c9b /test/gc.pit
parent3707dfaa64715c8fb1ba8a23f9762fef174538d8 (diff)
Fix doubles
Diffstat (limited to 'test/gc.pit')
-rw-r--r--test/gc.pit13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/gc.pit b/test/gc.pit
new file mode 100644
index 0000000..28eed50
--- /dev/null
+++ b/test/gc.pit
@@ -0,0 +1,13 @@
+(diagnostics!)
+(setq! foo (cons 1 2))
+(setq! bar (cons foo 3))
+(setq! baz (cons bar foo))
+(diagnostics!)
+(print! foo)
+(setcar! foo baz)
+(print! (cdr (car (car foo))))
+(diagnostics!)
+(setq! foo nil)
+(setq! bar nil)
+(setq! baz nil)
+(diagnostics!)