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
Please answer these questions before submitting your issue. Thanks!
go1.11 darwin/amd64
yes. It is reproduced only with go 1.11
1.11
GOARCH="amd64" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="darwin" GOOS="darwin" GOPROXY="" GORACE="" GOROOT="/usr/local/Cellar/go/1.11/libexec" GOTMPDIR="" GOTOOLDIR="/usr/local/Cellar/go/1.11/libexec/pkg/tool/darwin_amd64" GCCGO="gccgo" CC="clang" CXX="clang++" CGO_ENABLED="1" GOMOD="" 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 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/n3/mmrp5zqs4l32jk1bnxghymkh0000gn/T/go-build253851043=/tmp/go-build -gno-record-gcc-switches -fno-common"
package main import "fmt" func main() { slice := make([]int, 0) if len(slice) > 10 { slice = append(slice, 1) } fmt.Println(slice[len(slice)-1]) }
panic: runtime error: index out of range goroutine 1 [running]: main.main() /tmp/sandbox394962805/main.go:10 +0x20
0 Process finished with exit code 0
The text was updated successfully, but these errors were encountered:
duplicates #27378
Sorry, something went wrong.
No branches or pull requests
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using?
go1.11 darwin/amd64
Does this issue reproduce with the latest release?
yes. It is reproduced only with go
1.11
What operating system and processor architecture are you using?
What did you do?
What did you expect to see?
What did you see instead?
The text was updated successfully, but these errors were encountered: