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: gives error "doc: invalid program: unexpected type for embedded field" for valid program #15670

minux opened this issue May 13, 2016 · 1 comment


Copy link

minux commented May 13, 2016

Run go doc . T on this package:

package a

import (
        _fmt "fmt"

type T struct {

go doc . T outputs:

doc: invalid program: unexpected type for embedded field
type T struct {

However, the program is correct as it can be accepted by go build.

/cc @robpike

@minux minux added this to the Go1.8 milestone May 13, 2016
@robpike robpike self-assigned this May 13, 2016
Copy link

dsnet commented Aug 3, 2016

Apparently, I fixed this in f575873.

@dsnet dsnet closed this as completed Aug 3, 2016
@golang golang locked and limited conversation to collaborators Aug 3, 2017
@rsc rsc unassigned robpike Jun 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet

No branches or pull requests

4 participants