symphonytool / symphony

The Symphony IDE
5 stars 4 forks source link

Interpreter: obscure error message on assignment to value #284

Closed joey-coleman closed 9 years ago

joey-coleman commented 10 years ago

The process below (correctly) produces the error:

Set not permitted for nat1 at in '/Users/jwc/.../workspace/test/test.cml' at line 4:2

The error is caused by trying to assign to an action parameter, which is semantically, correct, but the error gives no indication of what failed. Also, the error location is a bit misleading; it would probably identify 3:31 as the location in this case.

process Test = begin
actions
  assignFail = val n : nat1 @ n := n + 1
@ assignFail(1)
end

[Found by @klaus15]