diff options
Diffstat (limited to 'testsuite/runnable/procedure_cast.elna')
| -rw-r--r-- | testsuite/runnable/procedure_cast.elna | 9 |
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. |
