diff options
Diffstat (limited to 'test/c/short_circuit.sail')
| -rw-r--r-- | test/c/short_circuit.sail | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/c/short_circuit.sail b/test/c/short_circuit.sail new file mode 100644 index 00000000..8289efa6 --- /dev/null +++ b/test/c/short_circuit.sail @@ -0,0 +1,22 @@ + +$include <exception_basic.sail> +$include <flow.sail> + +val print = "print_endline" : string -> unit + +val test : unit -> bool effect {escape} + +function test () = { + assert(false); + false +} + +val main : unit -> unit effect {escape} + +function main () = { + if false & test() then { + print("unreachable"); + } else { + print("ok"); + } +}
\ No newline at end of file |
