Skip to content

Commit c0ab013

Browse files
adonovangopherbot
authored andcommitted
go/packages: doc: type symbols are consistent only within one Load
Updates golang/go#66690 Change-Id: I26199c39434ab83c1a25756bd5f135a0ea785fad Reviewed-on: https://go-review.googlesource.com/c/tools/+/577256 Auto-Submit: Alan Donovan <[email protected]> Reviewed-by: Robert Griesemer <[email protected]> Reviewed-by: Robert Findley <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
1 parent 564c0e9 commit c0ab013

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

go/packages/packages.go

+4
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,10 @@ type Package struct {
428428
// The NeedTypes LoadMode bit sets this field for packages matching the
429429
// patterns; type information for dependencies may be missing or incomplete,
430430
// unless NeedDeps and NeedImports are also set.
431+
//
432+
// Each call to [Load] returns a consistent set of type
433+
// symbols, as defined by the comment at [types.Identical].
434+
// Avoid mixing type information from two or more calls to [Load].
431435
Types *types.Package
432436

433437
// Fset provides position information for Types, TypesInfo, and Syntax.

0 commit comments

Comments
 (0)