From: Brad Fitzpatrick Date: Fri, 17 Mar 2017 23:53:19 +0000 (+0000) Subject: Revert "go/types: enforce Check path restrictions via panics" X-Git-Tag: go1.9beta1~1116 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=d83af90a894cc6edaed97cea0edac62dfe8ba69a;p=gostls13.git Revert "go/types: enforce Check path restrictions via panics" This reverts commit b744a11a966ad3999c190fea9909ec8df0570b87. 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 --- diff --git a/src/go/types/api.go b/src/go/types/api.go index 7b7836fccd..7202828f32 100644 --- a/src/go/types/api.go +++ b/src/go/types/api.go @@ -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) }