From d83af90a894cc6edaed97cea0edac62dfe8ba69a Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Fri, 17 Mar 2017 23:53:19 +0000 Subject: [PATCH] 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 --- src/go/types/api.go | 3 --- 1 file changed, 3 deletions(-) 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) } -- 2.48.1