<bcardiff> I think it is missleading. It should not compile since the `bar = `is creating a variable inside the block. Please, submit an issue @Winty .
greengriminal has joined #crystal-lang
greengriminal has quit [Client Quit]
<bcardiff> A workaround is either use a different variable name, or call the setter`itself.bar = "FooBar"`if that is what you want.
itself works but i think if i yield using with it should always prefer methods of the yielded class
thats the reason why im yielding using with. so i don't have to type receiver for every call
<bcardiff> it won't pick the setter. that's for sure. But it is missleading that the second call to getter resolves to the variable, but the first one doesn't. Since the variable will hide the getter, that snippet should refuse to compile with a "read before write variable"
took me a while to get what bcardiff was saying, but i agree