You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implicitly declared local variables are supposed to have the function-level scope (as stated in the doc). But, it appears to be restricted to the scope they were assigned.
Steps to reproduce
defexample( nondet ):
# Exepcted that `v` is declared function-wide.# Thus, the implicit declaration of `var v` should've been hoisted to the top of the function.ifnondet:
v=1# assignment here, implicitly declaring a local variable `v`else:
v=2print( v ) # error: "use of unknown declaration 'v'"
ematejska
changed the title
[BUG]: Implicitly declared local variables (in def functions) may not be function-scoped
[Docs]: Implicitly declared local variables (in def functions) may not be function-scoped
Jan 3, 2024
Bug description
Implicitly declared local variables are supposed to have the function-level scope (as stated in the doc). But, it appears to be restricted to the scope they were assigned.
Steps to reproduce
System information
The text was updated successfully, but these errors were encountered: