News for hackers. Stuff that matters.
Re:Go says Wat by sacado2 on Friday September 07, 2018 @10:07AM (#17934305)
> 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 {
           ...
        }
    }

There are no comments on this comment yet.