Fixes #13977.
Change-Id: Icf54b4d2d746d30da207d1e17c975d18188b1cf8
Reviewed-on: https://go-review.googlesource.com/18702
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Alan Donovan <adonovan@google.com>
}
p := fmt.Sprintf("package %s %s\n$$\n", importpkg.Name, tag)
cannedimports(file, p)
+ // Reset incannedimport flag (we are not truly in a
+ // canned import) - this will cause importpkg.Direct to
+ // be set via parser.import_package (was issue #13977).
+ //
+ // TODO(gri) Remove this global variable and convoluted
+ // code in the process of streamlining the import code.
+ incannedimport = 0
default:
Yyerror("no import in %q", f.U.(string))