From 5613f3417aa766041fe1a91d27861f08d0facba9 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Mon, 10 Aug 2026 17:39:13 +0100 Subject: Fix creation of arbitrary constructed struct values --- examples/03-struct-generic/src/point.hob | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'examples') diff --git a/examples/03-struct-generic/src/point.hob b/examples/03-struct-generic/src/point.hob index ec6d76e..5beed86 100644 --- a/examples/03-struct-generic/src/point.hob +++ b/examples/03-struct-generic/src/point.hob @@ -1,3 +1,9 @@ +/// A set of drawings. +struct OwnedLineDrawing[TPoint] { + field drawing: LineDrawing[TPoint]; + field owner: String; +} + /// A 2D drawing made up of straight lines. struct LineDrawing2D { field lines: List[Line[Point2D]]; @@ -8,6 +14,12 @@ struct LineDrawing[TPoint] { field lines: List[Line[TPoint]]; } +/// A cubic Bezier curve. +struct BezierCurve[TPoint] { + field start: Line[TPoint]; + field end: Line[TPoint]; +} + /// A straight line from one point to another. struct Line[TPoint] { field start: TPoint; -- cgit v1.2.3