mirror of https://github.com/golang/go.git
go/ast: fix ast.MergePackageFiles iteration order
This commit changes ast.MergePackageFiles to iterate over imports in the same order when ast.FilterImportDuplicates mode is disabled.
This commit is contained in:
parent
06d8e2db54
commit
c74f4dfd85
|
|
@ -474,7 +474,8 @@ func MergePackageFiles(pkg *Package, mode MergeMode) *File {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
for _, f := range pkg.Files {
|
||||
for _, filename := range filenames {
|
||||
f := pkg.Files[filename]
|
||||
imports = append(imports, f.Imports...)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue