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
Make local scope for else blocks in try/catch/else (#51785)
[Docs](https://docs.julialang.org/en/v1/manual/control-flow/#else-Clauses)
state:
> The try, catch, else, and finally clauses each introduce their own
> scope blocks.
But it is currently not the case for `else` blocks
```julia
julia> try
catch
else
z = 1
end
1
julia> z
1
```
This change actually makes `else` blocks have their own scope block:
```julia
julia> try
catch
else
z = 1
end
1
julia> z
ERROR: UndefVarError: `z` not defined
```
0 commit comments