-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Description
What version of Go are you using (go version
)?
$ go version go version go1.17.7 darwin/arm64
Does this issue reproduce with the latest release?
yes ( v0.1.10 )
What operating system and processor architecture are you using (go env
)?
go env
Output
$ go envGO111MODULE=""
GOARCH="arm64"
GOBIN=""
GOCACHE="/Users/yuki/Library/Caches/go-build"
GOENV="/Users/yuki/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="arm64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/yuki/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/yuki/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_arm64"
GOVCS=""
GOVERSION="go1.17.7"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/yuki/gopath/src/go-test/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/00/79n00m9j66zf77ppbmrzg_300000gn/T/go-build438069086=/tmp/go-build -gno-record-gcc-switches -fno-common"
What did you do?
go install golang.org/x/tools/go/analysis/passes/nilness/cmd/nilness@latest
put main.go
package main
import "fmt"
type dummy struct {
innerDummy
}
type innerDummy struct {
value int
}
func main() {
var d *dummy
fmt.Println(d.value)
}
nilness ./...
What did you expect to see?
The correct error location is displayed.
What did you see instead?
-: nil dereference in field selection