Example from the manual fails to compile
The following example, taken from section 2.3.2 of the manual, fails to compile with a clocking error.
node modes(v:int) returns (o:int)
var last x:int = 0;
let
o = x;
present
| v > 1 do x = last x + v
| v = 1 do x = last x * 2
| v <= 0 do x = last x - v
end
tel
$ heptc file.ept
Incoherent clock between right and left side of the equation.
File "file.ept", line XX, characters AA-BB:
>| v > 1 do x = last x + v
> ^^^^^^^^^^^^^^
Clock Clash: this expression has clock 'a112 on true(ck),
but is expected to have clock 'a112.