summaryrefslogtreecommitdiff
path: root/examples/12-shared/src/point.hob
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2026-08-05 18:44:26 +0100
committerMichael Williamson <mike@zwobble.org>2026-08-05 18:44:26 +0100
commit8455bb19b7d4235e667cab9112aa276557969dcc (patch)
tree3ad5a7cf2941c4918f9e6de612a711cd8846570f /examples/12-shared/src/point.hob
parent266e826749b62c46e14d9590351f8c3b2de53512 (diff)
Type check generic native types
Diffstat (limited to 'examples/12-shared/src/point.hob')
-rw-r--r--examples/12-shared/src/point.hob11
1 files changed, 11 insertions, 0 deletions
diff --git a/examples/12-shared/src/point.hob b/examples/12-shared/src/point.hob
new file mode 100644
index 0000000..7b9a8e6
--- /dev/null
+++ b/examples/12-shared/src/point.hob
@@ -0,0 +1,11 @@
+/// A straight line from one point to another.
+struct Line {
+ field start: Shared[Point];
+ field end: Shared[Point];
+}
+
+/// A 2D point.
+struct Point {
+ field x: Int32;
+ field y: Int32;
+}