<p dir="auto">by <strong>yeswah</strong>:</p>
<pre class="notranslate">Before filing a bug, please check whether it has been fixed since
the latest release: run "hg pull", "hg update default", rebuild, and
retry
what you did to
reproduce the problem.  Thanks.

What steps will reproduce the problem?
1.
2.
3.

When I want to change code from


func main() {
    i := 0
    fmt.Println(i)
    i, j := test()
    fmt.Println(j)
    fmt.Println(i)
}

to 

func main() {
    i := 0
    fmt.Println(i)
    if i == 0 {
        i, j := test()
        fmt.Println(j)
    }
    fmt.Println(i)
}

I always can't find the bug 

var i has been redefined!!


func test() (int, int) {
    return 1, 2
}


What is the expected output?
0
2
1

What do you see instead?
0
2
0

Which compiler are you using (5g, 6g, 8g, gccgo)?
8g

Which operating system are you using?
windows7

Which revision are you using?  (hg identify)
r60


Please provide any additional information below.</pre>
<pre class="notranslate">The spec language is vague to non-existent regarding what happens when maps and channels
are assigned to variables (reference assignment only).</pre>