
module Test
	use array.Array
	use ref.Ref
	use ref.Refint
	use int.Int

	let b[@infer](x:int): unit
	=
		let k = ref 0 in
		while (!k < x) do
		variant { x - !k }
		invariant { 0 <= !k < x}
		incr k;
		()
		done; ()

	let b3[@infer:box](x:int): unit
	=
		let k = ref 0 in
		while (!k < x) do
		variant { x - !k }
		invariant { 0 <= !k < x}
		incr k;
		()
		done; ()

end
