diff options
| author | Eugen Wissner <belka@caraus.de> | 2026-10-28 23:47:15 +0100 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2026-10-28 23:47:15 +0100 |
| commit | d54b7d86beff8bb91e204e56a7ec01d3ab8ca43c (patch) | |
| tree | c24c4c8962f7b3c4fc79b107d5d0928bdc63c491 /source/std.elna | |
| parent | 9f85fa784927f5b6ff07ce043eb46a3e9236760f (diff) | |
| download | elna-d54b7d86beff8bb91e204e56a7ec01d3ab8ca43c.tar.gz | |
Fix type checker traversal for record and array literals
Diffstat (limited to 'source/std.elna')
| -rw-r--r-- | source/std.elna | 13 |
1 files changed, 13 insertions, 0 deletions
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. |
