]> Cypherpunks repositories - gostls13.git/commitdiff
Revert "go/types: enforce Check path restrictions via panics"
authorBrad Fitzpatrick <bradfitz@golang.org>
Fri, 17 Mar 2017 23:53:19 +0000 (23:53 +0000)
committerBrad Fitzpatrick <bradfitz@golang.org>
Fri, 17 Mar 2017 23:53:27 +0000 (23:53 +0000)
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 <bradfitz@golang.org>
src/go/types/api.go

index 7b7836fccd4c14178312423cc5cc751d2d8d0806..7202828f32a40dab0c4623deacb4bdcad87013c6 100644 (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)
 }