-
Notifications
You must be signed in to change notification settings - Fork 18.9k
Open
golang/tools
#583Labels
BadErrorMessageIssues related compiler error messages that should be better.Issues related compiler error messages that should be better.NeedsDecisionFeedback is required from experts, contributors, and/or the community before a change can be made.Feedback is required from experts, contributors, and/or the community before a change can be made.ToolProposalIssues describing a requested change to a Go tool or command-line program.Issues describing a requested change to a Go tool or command-line program.ToolsThis label describes issues relating to any tools in the x/tools repository.This label describes issues relating to any tools in the x/tools repository.
Milestone
Description
Go version
go version go1.24.5 darwin/arm64
Output of go env in your module/workspace:
AR='ar'
CC='cc'
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_ENABLED='1'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
CXX='c++'
GCCGO='gccgo'
GO111MODULE=''
GOARCH='arm64'
GOARM64='v8.0'
GOAUTH='netrc'
GOBIN=''
GOCACHE='/Users/bkreitch/Library/Caches/go-build'
GOCACHEPROG=''
GODEBUG=''
GOENV='/Users/bkreitch/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFIPS140='off'
GOFLAGS=''
GOGCCFLAGS='-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/hx/91lpwn6j1yq000cp_j1np6k00000gq/T/go-build1319912065=/tmp/go-build -gno-record-gcc-switches -fno-common'
GOHOSTARCH='arm64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMOD='/Users/bkreitch/github/bkreitch/golang-tools/go.mod'
GOMODCACHE='/Users/bkreitch/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='darwin'
GOPATH='/Users/bkreitch/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/opt/homebrew/Cellar/go/1.24.5/libexec'
GOSUMDB='sum.golang.org'
GOTELEMETRY='local'
GOTELEMETRYDIR='/Users/bkreitch/Library/Application Support/go/telemetry'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/opt/homebrew/Cellar/go/1.24.5/libexec/pkg/tool/darwin_arm64'
GOVCS=''
GOVERSION='go1.24.5'
GOWORK=''
PKG_CONFIG='pkg-config'What did you do?
crossfile.go:
package crossfile
func ShadowGlobal() {
{
global := 1 // line 5
_ = global
}
_ = global
}other.go:
package crossfile
var global int // line 3$ shadow .
What did you see happen?
crossfile.go:5:3: declaration of "global" shadows declaration at line 3
What did you expect to see?
crossfile.go:5:3: declaration of "global" shadows declaration at line 3 in other.go
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
BadErrorMessageIssues related compiler error messages that should be better.Issues related compiler error messages that should be better.NeedsDecisionFeedback is required from experts, contributors, and/or the community before a change can be made.Feedback is required from experts, contributors, and/or the community before a change can be made.ToolProposalIssues describing a requested change to a Go tool or command-line program.Issues describing a requested change to a Go tool or command-line program.ToolsThis label describes issues relating to any tools in the x/tools repository.This label describes issues relating to any tools in the x/tools repository.