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!
go version
go version go1.11 darwin/amd64
yes
go env
GOARCH="amd64" GOBIN="/Users/lambda/go/bin" GOCACHE="/Users/lambda/Library/Caches/go-build" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="darwin" GOOS="darwin" GOPATH="/Users/lambda/go" 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/mc/sfhb63qd0d70fmjxs0yx403r0000gn/T/go-build374526914=/tmp/go-build -gno-record-gcc-switches -fno-common"
I tried getting the len() of a string. But every time i try to do that the type checker
⇣84% ➜ go build # github.com/dexm-coin/dexmd/blockchain panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x70 pc=0x177bcbe] goroutine 1 [running]: cmd/compile/internal/gc.typecheck1(0xc0003b7980, 0x1, 0xc0003b7500) /usr/local/Cellar/go/1.11/libexec/src/cmd/compile/internal/gc/typecheck.go:1270 +0x3ece cmd/compile/internal/gc.typecheck(0xc0003b7980, 0x1, 0xc0003b7500) /usr/local/Cellar/go/1.11/libexec/src/cmd/compile/internal/gc/typecheck.go:238 +0x6ad cmd/compile/internal/gc.typecheckslice(0xc00038fe00, 0x4, 0x4, 0x1) /usr/local/Cellar/go/1.11/libexec/src/cmd/compile/internal/gc/typecheck.go:68 +0x50 cmd/compile/internal/gc.Main(0x18c0388) /usr/local/Cellar/go/1.11/libexec/src/cmd/compile/internal/gc/main.go:518 +0x2059 main.main() /usr/local/Cellar/go/1.11/libexec/src/cmd/compile/main.go:51 +0x96
This is the code that is causing the panic https://github.com/BadLamb/golang-panic Precisely this line https://github.com/BadLamb/golang-panic/blob/master/blockchain/api.go#L42
A build
That thing
The text was updated successfully, but these errors were encountered:
This is #27356 It missed the 1.11.1 window so it should be in 1.11.2 as described in #27973 (comment)
Sorry, something went wrong.
oh ok thanks.
Anyway your code is not valid, you cannot shadow len and expect to use len(x)
len
len(x)
No branches or pull requests
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go version go1.11 darwin/amd64
Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?What did you do?
I tried getting the len() of a string. But every time i try to do that the type checker
This is the code that is causing the panic https://github.com/BadLamb/golang-panic
Precisely this line https://github.com/BadLamb/golang-panic/blob/master/blockchain/api.go#L42
What did you expect to see?
A build
What did you see instead?
That thing
The text was updated successfully, but these errors were encountered: