Analyzer issue regarding scoping of variables in if then else.
The following code yields a compile time error saying the a variable in the else body is not bounded.
some-strategy: _ -> a with if not(a:=1) then <debug> "a is not 1" else <debug> a end
However, if you remove theSubmitted by André Vieira on 28 January 2013 at 15:58
notand swap around the two branched statements this error no longer occurs. Also, if a is not bound in the else then it should not be bounded at the rewrite stage of the strategy (
_ -> a) but it is, because if we replace
<debug> "something else", the error is solved.
Log in to post comments