summaryrefslogtreecommitdiff
path: root/pit/test/struct.pit
diff options
context:
space:
mode:
authorLLLL Colonq <llll@colonq>2026-09-06 17:40:51 -0400
committerLLLL Colonq <llll@colonq>2026-09-06 17:40:51 -0400
commit71bfa9094a4a25f762d681bb07f79f92a95dbb87 (patch)
tree1b7ff31dad86e072a37e4270e762a5e0f12f87ac /pit/test/struct.pit
parent843ea34efc2c5ea10edc4d534304f8287f97fbbc (diff)
pit: Fix evaluator bug
Diffstat (limited to 'pit/test/struct.pit')
-rw-r--r--pit/test/struct.pit11
1 files changed, 11 insertions, 0 deletions
diff --git a/pit/test/struct.pit b/pit/test/struct.pit
new file mode 100644
index 0000000..9e35654
--- /dev/null
+++ b/pit/test/struct.pit
@@ -0,0 +1,11 @@
+(defstruct! foo
+ x
+ y
+ z)
+
+(setq! x (foo/new :y 10 :x 5 :z 111))
+(print! x)
+(print! (foo/get-y x))
+(foo/set-y! x 42)
+(print! (foo/get-y x))
+(print! (foo/get-z x))