From 0504cd68e6561b962354821bccf04f5cf080662e Mon Sep 17 00:00:00 2001 From: elpinal <6elpinal@gmail.com> Date: Sat, 16 Dec 2017 15:04:05 +0900 Subject: 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 Run-TryBot: Robert Griesemer TryBot-Result: Gobot Gobot --- src/cmd/doc/testdata/pkg.go | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'src/cmd/doc/testdata') diff --git a/src/cmd/doc/testdata/pkg.go b/src/cmd/doc/testdata/pkg.go index d0995bbf7d..bc069939f8 100644 --- a/src/cmd/doc/testdata/pkg.go +++ b/src/cmd/doc/testdata/pkg.go @@ -60,14 +60,15 @@ func internalFunc(a int) bool // Comment about exported type. type ExportedType struct { // Comment before exported field. - ExportedField int // Comment on line with exported field. - unexportedField int // Comment on line with unexported field. - ExportedEmbeddedType // Comment on line with exported embedded field. - *ExportedEmbeddedType // Comment on line with exported embedded *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. - error // Comment on line with embedded error. + ExportedField int // Comment on line with exported field. + 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. + error // Comment on line with embedded error. } // Comment about exported method. -- cgit v1.3