summaryrefslogtreecommitdiff
path: root/examples/02-sum/src
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2026-06-13 21:46:25 +0100
committerMichael Williamson <mike@zwobble.org>2026-06-13 21:46:25 +0100
commit6228eee4a2382585ac83783529016e6df65b3537 (patch)
tree1f2df0d1a214303dcd793fd547732500ce1497ee /examples/02-sum/src
parent4ba00f412eff5f0c63371f98abcb41a82fd0819b (diff)
Add field to sum type in example
Diffstat (limited to 'examples/02-sum/src')
-rw-r--r--examples/02-sum/src/shapes.hob2
1 files changed, 2 insertions, 0 deletions
diff --git a/examples/02-sum/src/shapes.hob b/examples/02-sum/src/shapes.hob
index d5042e5..03a727a 100644
--- a/examples/02-sum/src/shapes.hob
+++ b/examples/02-sum/src/shapes.hob
@@ -2,6 +2,8 @@
sum Shape {
variant Rectangle;
variant Triangle;
+
+ field width: Int32;
}
struct Rectangle {