aboutsummaryrefslogtreecommitdiff
path: root/testsuite/runnable/procedure_cast.elna
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2026-08-25 13:31:38 +0200
committerEugen Wissner <belka@caraus.de>2026-08-25 13:31:38 +0200
commitdf51f9c4ee0ee4ac22206513bcd60e6928b7eaeb (patch)
tree3dcb6d17869e56dfb5ca33027b904d9ee72e6263 /testsuite/runnable/procedure_cast.elna
parent7d0d0eb69589ab8e0c8b036a3b642593a372b041 (diff)
downloadelna-df51f9c4ee0ee4ac22206513bcd60e6928b7eaeb.tar.gz
Fix compatible procedure cast
Diffstat (limited to 'testsuite/runnable/procedure_cast.elna')
-rw-r--r--testsuite/runnable/procedure_cast.elna9
1 files changed, 9 insertions, 0 deletions
diff --git a/testsuite/runnable/procedure_cast.elna b/testsuite/runnable/procedure_cast.elna
new file mode 100644
index 0000000..27977e1
--- /dev/null
+++ b/testsuite/runnable/procedure_cast.elna
@@ -0,0 +1,9 @@
+var cb: proc(x: ^Char): Int
+
+proc probe_int(x: ^Int): Int
+return 42
+
+begin
+ cb := cast(probe_int: proc(x: ^Char): Int);
+ assert(cb(nil) = 42)
+end.