aboutsummaryrefslogtreecommitdiff
path: root/testsuite/runnable/procedure_cast.elna
blob: 0e8aa925b89a26e25b5da6991faf91f0ab788116 (plain)
1
2
3
4
5
6
7
8
9
10
11
program()
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^(cast(0u: ^Char)) = 42)
end.