example:
public clock x := 0;
public clock y := 0_ms;
will not evaluate to a clock variable. It will evaluate to an int:
evaluated:
x :-> 0 i
y :-> 0 c
The clock keyword is being ignored in favour of the right-hand-side expression...
You can even do this:
and it will work.
We should throw an exception if the RHS and type specification does not match (or cannot be implicitly converted).
essentially, all TYPEs are treated as auto at the moment
example:
will not evaluate to a clock variable. It will evaluate to an int:
The
clockkeyword is being ignored in favour of the right-hand-side expression...You can even do this:
and it will work.
We should throw an exception if the RHS and type specification does not match (or cannot be implicitly converted).
essentially, all
TYPEs are treated asautoat the moment