diff --git a/go/types/gcimporter.go b/go/types/gcimporter.go index 3527587a..2ca0fd20 100644 --- a/go/types/gcimporter.go +++ b/go/types/gcimporter.go @@ -506,7 +506,10 @@ func (p *gcParser) parseStructType() Type { if tags != nil { tags = append(tags, tag) } - if alt := scope.Insert(fld); alt != nil { + if fld.name == "_" { + // blank identifiers are not declared + fld.setParent(scope) + } else if alt := scope.Insert(fld); alt != nil { pname := "" if pkg := alt.Pkg(); pkg != nil { pname = pkg.name