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)?
GOARCH="amd64"
GOBIN=""
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/02/nfvdwz45077g85khfsv07khm0000gn/T/go-build787448559=/tmp/go-build -gno-record-gcc-switches -fno-common"
What did you do?
https://play.golang.org/p/SMcx3vUC83W
Compile this code with Go 1.11 and Go 1.10.3 respectively.
What did you expect to see?
Code compiles without any error with both Go 1.11 and Go 1.10.3.
What did you see instead?
Go 1.11 failed to compile this code with the following error:
On my machine:
❯ go build recur.go
# command-line-arguments
./recur.go:10:6: invalid recursive type Executor
./recur.go:16:29: cannot use callback (type func(*Executor) error) as type Executor in field value
./recur.go:21:19: cannot call non-function e.callback (type Executor)
Go 1.10.3 succeeded without any issue.
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?
https://play.golang.org/p/SMcx3vUC83W
Compile this code with Go 1.11 and Go 1.10.3 respectively.
What did you expect to see?
Code compiles without any error with both Go 1.11 and Go 1.10.3.
What did you see instead?
Go 1.11 failed to compile this code with the following error:
On my machine:
Go 1.10.3 succeeded without any issue.