aboutsummaryrefslogtreecommitdiff
path: root/testsuite/runnable/procedure_cast.elna
blob: 724fadf8023e67ecd3b4eab924c1d3afb982dc55 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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)
return 0u8

end.