channel io.

event Foo(bitstring).
event Bar(bitstring).

let P() =
  in(io, b: bool);
  new x: bitstring;
  if b then
    event Foo(x)
  else
    event Bar(x);
    0.

query event(Foo(new x)) && event(Bar(new x)).

query i: sid; event(Foo(new x[!1 = i])) && event(Bar(new x[!2 = i])).


process
  !P()


(* EXPECTPV
RESULT not (event(Foo(x[b = v,!1 = v_1])) && event(Bar(x[b = v_2,!1 = v_3]))) is false.
Error: variable !2 not defined at restriction x.
xtime: error in child process (status : 2)
END *)
