• Matthew Dempsky's avatar
    cmd/compile: allow := to shadow dot-imported names · f22ef702
    Matthew Dempsky authored
    Historically, gc optimistically parsed the left-hand side of
    assignments as expressions. Later, if it discovered a ":=" assignment,
    it rewrote the parsed expressions as declarations.
    
    This failed in the presence of dot imports though, because we lost
    information about whether an imported object was named via a bare
    identifier "Foo" or a normal qualified "pkg.Foo".
    
    This CL fixes the issue by specially noding the left-hand side of ":="
    assignments.
    
    Fixes #22076.
    
    Change-Id: I18190ecdb863112e7d009e1687e6112eec559921
    Reviewed-on: https://go-review.googlesource.com/66810
    Run-TryBot: Matthew Dempsky <mdempsky@google.com>
    Reviewed-by: 's avatarDaniel Martí <mvdan@mvdan.cc>
    Reviewed-by: 's avatarRobert Griesemer <gri@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    f22ef702
Name
Last commit
Last update
..
addr2line Loading commit data...
api Loading commit data...
asm Loading commit data...
cgo Loading commit data...
compile Loading commit data...
cover Loading commit data...
dist Loading commit data...
doc Loading commit data...
fix Loading commit data...
go Loading commit data...
gofmt Loading commit data...
internal Loading commit data...
link Loading commit data...
nm Loading commit data...
objdump Loading commit data...
pack Loading commit data...
pprof Loading commit data...
trace Loading commit data...
vendor Loading commit data...
vet Loading commit data...