-
Notifications
You must be signed in to change notification settings - Fork 243
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Go indexer: Handle resolution of the 'unsafe' metapackage.
Summary: The type checker does not include "unsafe" as a package dependency, since it isn't a real package but a special hook for the compiler. For indexing purposes we pretend it IS s real package so that references will resolve. - Extractor: Don't treat 'unsafe' as a missing package. - Add a unit test for resolution of the 'unsafe' package. - Add ForStandardLibrary to the govname package. Reviewers: #core_team, shahms Reviewed By: #core_team, shahms Differential Revision: https://phabricator-dot-kythe-repo.appspot.com/D1256
- Loading branch information
M. J. Fromberger
committed
Jan 12, 2017
1 parent
7e92157
commit 0570c4e
Showing
7 changed files
with
59 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// Package magic tests resolution of the "unsafe" metapackage. | ||
package magic | ||
|
||
//- @"\"unsafe\"" ref/imports Unsafe=vname("package", "golang.org", _, "unsafe", "go") | ||
import "unsafe" | ||
|
||
//- @foo defines/binding Foo | ||
//- Foo.node/kind variable | ||
//- @unsafe ref Unsafe | ||
//- @Pointer ref UnsafePointer | ||
var foo unsafe.Pointer |