We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"sync/atomic".Pointer
go version
$ go version go version go1.19.4 linux/amd64
Yes.
go env
$ go env GO111MODULE="" GOARCH="amd64" GOBIN="" GOCACHE="/home/user/.cache/go-build" GOENV="/home/user/.config/go/env" GOEXE="" GOEXPERIMENT="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOINSECURE="" GOMODCACHE="/home/user/go/pkg/mod" GONOPROXY="" GONOSUMDB="" GOOS="linux" GOPATH="/home/user/go" GOPRIVATE="" GOPROXY="https://proxy.golang.org,direct" GOROOT="/usr/lib/go" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64" GOVCS="" GOVERSION="go1.19.4" GCCGO="gccgo" GOAMD64="v1" AR="ar" CC="gcc" CXX="g++" CGO_ENABLED="1" GOMOD="/home/user/gobug/go.mod" GOWORK="" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build1405439721=/tmp/go-build -gno-record-gcc-switches"
Tried to go build the following:
go build
package bug import "sync/atomic" type node struct { next atomic.Pointer[node] }
Not providing go.dev/play link because it's running go1.19.2, where the bug does not occur.
go.dev/play
go1.19.2
It compiles without errors.
go build # bug ./bug.go:5:6: invalid recursive type node ./bug.go:5:6: node refers to ./bug.go:6:16: atomic.Pointer refers to ./bug.go:5:6: node
The text was updated successfully, but these errors were encountered:
atomic.Pointer
@mateusz834 likely caused by 7025ae0#diff-74356a5476466d442c2023f47d58e830715ba62eacd24b331200899a9cc3909cR45
Sorry, something went wrong.
Duplicate of #57124
No branches or pull requests
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Tried to
go build
the following:Not providing
go.dev/play
link because it's runninggo1.19.2
, where the bug does not occur.What did you expect to see?
It compiles without errors.
What did you see instead?
The text was updated successfully, but these errors were encountered: