From b22818684cab827b3696379bc52f8f23de9f80e1 Mon Sep 17 00:00:00 2001 From: Rebecca Stambler Date: Fri, 4 Oct 2019 13:28:47 -0400 Subject: [PATCH] go/internal/gcimporter: support Go versions < 1.11 Fixes golang/go#34689 Change-Id: I7ab6c5a00c24a188b2dbd75160091cf6c834bd6a Reviewed-on: https://go-review.googlesource.com/c/tools/+/199037 Run-TryBot: Rebecca Stambler Reviewed-by: Robert Griesemer --- go/internal/gcimporter/iexport.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/go/internal/gcimporter/iexport.go b/go/internal/gcimporter/iexport.go index 388e0bcfa7..5f00153f89 100644 --- a/go/internal/gcimporter/iexport.go +++ b/go/internal/gcimporter/iexport.go @@ -6,8 +6,6 @@ // This file was derived from $GOROOT/src/cmd/compile/internal/gc/iexport.go; // see that file for specification of the format. -// +build go1.11 - package gcimporter import ( @@ -399,7 +397,7 @@ func (w *exportWriter) doTyp(t types.Type, pkg *types.Package) { w.pos(f.Pos()) w.string(f.Name()) w.typ(f.Type(), pkg) - w.bool(f.Embedded()) + w.bool(f.Anonymous()) w.string(t.Tag(i)) // note (or tag) }