summaryrefslogtreecommitdiff
path: root/test/typecheck/pass/nlflow.sail
blob: 9c4268193801f194d561d41ff3f68148e14e8fa7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
$option -non_lexical_flow

default Order dec

$include <prelude.sail>
$include <exception_basic.sail>

val foo : forall 'n, 'n != 8. int('n) -> unit

function test(xs: bitvector(4, dec)) -> unit = {
  if xs == 0b1000 then {
    throw(Exception())
  };
  let y = unsigned(xs);
  foo(y)
}