go: Not correct 'interface contains embedded non-interface' error depending on the order of source files
What version of Go are you using (go version)?
1.9.2
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (go env)?
set GOARCH=amd64 set GOBIN= set GOEXE=.exe set GOHOSTARCH=amd64 set GOHOSTOS=windows set GOOS=windows set GOPATH=C:\Development\GoWorkspace set GORACE= set GOROOT=C:\Development\Go set GOTOOLDIR=C:\Development\Go\pkg\tool\windows_amd64 set GCCGO=gccgo set CC=gcc set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 set CXX=g++ set CGO_ENABLED=1 set CGO_CFLAGS=-g -O2 set CGO_CPPFLAGS= set CGO_CXXFLAGS=-g -O2 set CGO_FFLAGS=-g -O2 set CGO_LDFLAGS=-g -O2 set PKG_CONFIG=pkg-config
What did you do?
There is a not correct ‘interface contains embedded non-interface’ error. When changing the order of file (by renaming them), the error is not anymore there.
To reproduce this error, download gist example in src directory and do ‘go build’.
Strange behavior:
- The Goat and Chicken interface are exactly the same, however, the error only occurs on the Goat interface.
- Rename B.go to D.go and the error is now on both the Goat and the Chicken interface.
- Rename Z.go to A.go and there is no error at all.
What did you expect to see?
Never an ‘interface contains embedded non-interface’ error.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 15 (12 by maintainers)
@gbbr I cannot reproduce this. Deleting B.go is fine. The code looks valid.
I am using the latest version at tip, albeit on OS X not Windows.