Re: [elixir-core:6028] Interesting edge case with assignment inside if

2016-07-04 Thread José Valim
> > Correct, and so I am accessing a variable that was rebound inside an if, > after the rebinding, and I don't get a warning. > Variables set inside "for" do not pass to the next iteration. For the first case, the compiler believes there is a chance (given the compiler does not execute the condit

Re: [elixir-core:6028] Interesting edge case with assignment inside if

2016-07-04 Thread Dave Thomas
> > > In other words, the code executed is the same, but the code compiled is > not the same, and the compiler doesn't know (much) about the execution > branches. > Correct, and so I am accessing a variable that was rebound inside an if, after the rebinding, and I don't get a warning. The co