aboutsummaryrefslogtreecommitdiff
path: root/testsuite/runnable/procedure_cast.elna
blob: 11e0e7290cc7cc6d6e55090b704defbe3a8c2d77 (plain)
1
2
3
4
5
6
7
8
9
10
var cb: proc(x: ^Char) -> Int

proc probe_int(x: ^Int) -> Int
return 42

program()
begin
  cb := cast(probe_int: proc(x: ^Char) -> Int);
  assert(cb(nil) = 42)
end.