From d54b7d86beff8bb91e204e56a7ec01d3ab8ca43c Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Wed, 28 Oct 2026 23:47:15 +0100 Subject: Fix type checker traversal for record and array literals --- source/std.elna | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'source/std.elna') diff --git a/source/std.elna b/source/std.elna index 31160a3..c028b93 100644 --- a/source/std.elna +++ b/source/std.elna @@ -5,5 +5,18 @@ module type StdString* = []const Word8 + StdOptional#[T]* = record + has_value: Bool; + value: ^T + end + +(* + Constructs an optional holding the pointer value. + + @param value Initial optional value. + @return Constructed optional. +*) +proc std_optional_make#[T]*(value: ^T) -> StdOptional#[T] +return { StdOptional#[T]; has_value: true, value: value } end. -- cgit v1.2.3