go/loader: don't treat unsafe specially wrt vendoring
The loader treats GOROOT's "unsafe" package specially,
with no source files and a Package of types.Unsafe.
Tested on Go 1.4.1, 1.5, and ~1.6 (tip).
Fixes issue #13882
Change-Id: I86c4e394665d86a50ec3852d6d702f0e9c5d2276
Reviewed-on: https://go-review.googlesource.com/18457
Reviewed-by: Robert Griesemer <gri@golang.org>
diff --git a/go/loader/util.go b/go/loader/util.go
index 4e01462..7f38dd7 100644
--- a/go/loader/util.go
+++ b/go/loader/util.go
@@ -103,8 +103,8 @@
if err != nil {
continue // quietly ignore the error
}
- if path == "C" || path == "unsafe" {
- continue // skip pseudo packages
+ if path == "C" {
+ continue // skip pseudopackage
}
imports[path] = true
}