Revert "go/types: enforce Check path restrictions via panics"

This reverts commit b744a11a96.

Reason for revert: Broke trybots. (misc-vetall builder is busted)

Change-Id: I651d1c18db2fb3cb6ec12c2ae62024627baf8d77
Reviewed-on: https://go-review.googlesource.com/38332
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Brad Fitzpatrick 2017-03-17 23:53:19 +00:00
parent da8e939ba9
commit d83af90a89
1 changed files with 0 additions and 3 deletions

View File

@ -347,9 +347,6 @@ func (init *Initializer) String() string {
// file set, and the package path the package is identified with.
// The clean path must not be empty or dot (".").
func (conf *Config) Check(path string, fset *token.FileSet, files []*ast.File, info *Info) (*Package, error) {
if path == "" || path == "." {
panic(`path must not be "" or "."`)
}
pkg := NewPackage(path, "")
return pkg, NewChecker(conf, fset, pkg, info).Files(files)
}