mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
[dev.typeparams] all: merge dev.regabi (063c72f) into dev.typeparams
Eager re-sync-branch to keep Git history reasonably accurate, since Git lacks a better way of encoding partial merges like CL 286172. Conflicts: - src/cmd/compile/internal/inline/inl.go - src/cmd/compile/internal/noder/import.go - src/cmd/compile/internal/noder/noder.go Merge List: + 2021-01-25063c72f06d[dev.regabi] cmd/compile: backport changes from dev.typeparams (9456804) + 2021-01-23d05d6fab32[dev.regabi] cmd/compile: replace ir.Name map with ir.NameSet for SSA 2 + 2021-01-2348badc5fa8[dev.regabi] cmd/compile: fix escape analysis problem with closures + 2021-01-2351e1819a8d[dev.regabi] cmd/compile: scan body of closure in tooHairy to check for disallowed nodes Change-Id: I48c0435f7aaf56f4aec26518a7459e9d95a51e9c
This commit is contained in:
commit
6d8d118762
5 changed files with 45 additions and 6 deletions
|
|
@ -176,6 +176,11 @@ func resolveImportPath(path string) (string, error) {
|
|||
|
||||
// TODO(mdempsky): Return an error instead.
|
||||
func importfile(decl *syntax.ImportDecl) *types.Pkg {
|
||||
if decl.Path.Kind != syntax.StringLit {
|
||||
base.Errorf("import path must be a string")
|
||||
return nil
|
||||
}
|
||||
|
||||
path, err := strconv.Unquote(decl.Path.Value)
|
||||
if err != nil {
|
||||
base.Errorf("import path must be a string")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue