cmd/doc: suppress the error message for *package.ident embedded in struct type

The current implementation prints a log, "invalid program: unexpected
type for embedded field", when the form *package.ident is embedded in
a struct declaration.

Note that since valid qualified identifiers must be exported, the result
for a valid program does not change.

Change-Id: If8b9d7056c56b6a6c5482eb749168a63c65ef685
Reviewed-on: https://go-review.googlesource.com/84436
Reviewed-by: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
elpinal 2017-12-16 15:04:05 +09:00 committed by Robert Griesemer
parent 9c64c65d0e
commit 0504cd68e6
3 changed files with 19 additions and 16 deletions

View file

@ -292,6 +292,7 @@ var tests = []test{
`unexportedField.*int.*Comment on line with unexported field.`,
`ExportedEmbeddedType.*Comment on line with exported embedded field.`,
`\*ExportedEmbeddedType.*Comment on line with exported embedded \*field.`,
`\*qualified.ExportedEmbeddedType.*Comment on line with exported embedded \*selector.field.`,
`unexportedType.*Comment on line with unexported embedded field.`,
`\*unexportedType.*Comment on line with unexported embedded \*field.`,
`io.Reader.*Comment on line with embedded Reader.`,