aboutsummaryrefslogtreecommitdiff
path: root/src/go/types/stdlib_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/go/types/stdlib_test.go')
-rw-r--r--src/go/types/stdlib_test.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/go/types/stdlib_test.go b/src/go/types/stdlib_test.go
index 503d0a6f44..d86a77a110 100644
--- a/src/go/types/stdlib_test.go
+++ b/src/go/types/stdlib_test.go
@@ -26,9 +26,15 @@ import (
. "go/types"
)
+// The cmd/*/internal packages may have been deleted as part of a binary
+// release. Import from source instead.
+//
+// (See https://golang.org/issue/43232 and
+// https://github.com/golang/build/blob/df58bbac082bc87c4a3cdfe336d1ffe60bbaa916/cmd/release/release.go#L533-L545.)
+//
// Use the same importer for all std lib tests to
// avoid repeated importing of the same packages.
-var stdLibImporter = importer.Default()
+var stdLibImporter = importer.ForCompiler(token.NewFileSet(), "source", nil)
func TestStdlib(t *testing.T) {
testenv.MustHaveGoBuild(t)