4 ms·
> Only if you don't use it. But a few lines below you could very well be using true legitimately too, in which case it wont tell you: Good point! Edit: but th
by sacado2 8y ago
> Only if you don't use it. But a few lines below you could very well be using true legitimately too, in which case it wont tell you:
Good point!
Edit: but then, your expected original variable name, `tue` in my example, would be used while not yet defined:
true := false
if foo() || bar {
tue = true // Compilation error
}
...
if condition() == true {
...
}
Only possible case I can think of: you already defined tue, but tried to redefine it via variable shadowing:
tue := true
...
if cond() {
true := false
if foo() || bar() {
tue = true // Will compile, but not the tue you expected
}
...
if condition == true {
...
}
}