Skip to content
New issue

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

cmd/doc: -all constraints: unexpected type for embedded field #50256

Closed
frioux opened this issue Dec 18, 2021 · 1 comment
Closed

cmd/doc: -all constraints: unexpected type for embedded field #50256

frioux opened this issue Dec 18, 2021 · 1 comment

Comments

@frioux
Copy link

frioux commented Dec 18, 2021

What version of Go are you using (go version)?

$ go version
go version go1.18beta1 linux/amd64

Does this issue reproduce with the latest release?

Sure

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/frew/.cache/go-build"
GOENV="/home/frew/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS="-mod=readonly"
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/frew/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/frew/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org"
GOROOT="/home/frew/sdk/go1.18beta1"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/home/frew/sdk/go1.18beta1/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.18beta1"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/frew/code/leatherman/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 -fmessage-length=0 -fdebug-prefix-map=/run/shm/go-build764406924=/tmp/go-build -gno-record-gcc-switches"

What did you do?

$ go1.18beta1 doc -all constraints

What did you expect to see?

Docs without errors

What did you see instead?

The following errors in front of the doc:

doc: invalid program: unexpected type for embedded field
doc: invalid program: unexpected type for embedded field
doc: invalid program: unexpected type for embedded field
doc: invalid program: unexpected type for embedded field
doc: invalid program: unexpected type for embedded field
doc: invalid program: unexpected type for embedded field
package constraints // import "constraints"

Package constraints defines a set of useful constraints to be used with type
parameters.

TYPES

type Complex interface {
        ~complex64 | ~complex128
}
    Complex is a constraint that permits any complex numeric type. If future
    releases of Go add new predeclared complex numeric types, this constraint
    will be modified to include them.

type Float interface {
        ~float32 | ~float64
...

My guess is that doc doesn't use the newer parser options or something?

@seankhliao seankhliao changed the title affected/package: cmd/doc cmd/doc: -all constraints: unexpected type for embedded field Dec 18, 2021
@gopherbot
Copy link

Change https://golang.org/cl/373314 mentions this issue: cmd/doc: don't log on constraint type elements

@golang golang locked and limited conversation to collaborators Dec 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants