diff --git a/interp/src.go b/interp/src.go index f7ccfad87..86f75f717 100644 --- a/interp/src.go +++ b/interp/src.go @@ -133,6 +133,7 @@ func (interp *Interpreter) importSrc(rPath, importPath string, skipTest bool) (s interp.mutex.Lock() gs := interp.scopes[importPath] if gs == nil { + interp.mutex.Unlock() // A nil scope means that no even an empty package is created from source. return "", fmt.Errorf("no Go files in %s", dir) }