diff options
| author | Eugen Wissner <belka@caraus.de> | 2026-11-01 22:10:48 +0100 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2026-11-01 22:10:48 +0100 |
| commit | 48a51628b841a9b69db846326dcaa67239a8559f (patch) | |
| tree | 76707565b96d42ee652179e4037e42a2c5559888 /testsuite/compilable | |
| parent | 5dd5d460f154c146d26f115706a21b7808658edf (diff) | |
| download | elna-48a51628b841a9b69db846326dcaa67239a8559f.tar.gz | |
Diffstat (limited to 'testsuite/compilable')
| -rw-r--r-- | testsuite/compilable/generic_inference.elna | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/testsuite/compilable/generic_inference.elna b/testsuite/compilable/generic_inference.elna index e5e6e3b..c03b902 100644 --- a/testsuite/compilable/generic_inference.elna +++ b/testsuite/compilable/generic_inference.elna @@ -13,6 +13,10 @@ var bytes: Cell#[Word8] f: File b: Word8 + s: []const Word8 + +proc identity#[T](value: ^T) -> ^T +return value proc store#[T](target: ^Cell#[T]; value: ^T) target^.held := value @@ -25,5 +29,6 @@ return begin store(@files, @f); relay(@bytes, @b); - store(@files, cast(0u: ^File)) + store(@files, cast(0u: ^File)); + s := identity(@b)[1 to 1] end. |
