aboutsummaryrefslogtreecommitdiff
path: root/testsuite/compilable/generic_inference.elna
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2026-11-01 22:10:48 +0100
committerEugen Wissner <belka@caraus.de>2026-11-01 22:10:48 +0100
commit48a51628b841a9b69db846326dcaa67239a8559f (patch)
tree76707565b96d42ee652179e4037e42a2c5559888 /testsuite/compilable/generic_inference.elna
parent5dd5d460f154c146d26f115706a21b7808658edf (diff)
downloadelna-48a51628b841a9b69db846326dcaa67239a8559f.tar.gz
Fix generic inference for a procedure call as a slice baseHEADcpp
Diffstat (limited to 'testsuite/compilable/generic_inference.elna')
-rw-r--r--testsuite/compilable/generic_inference.elna7
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.