diff options
Diffstat (limited to 'src/cmd/compile/internal/noder/import.go')
-rw-r--r-- | src/cmd/compile/internal/noder/import.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/cmd/compile/internal/noder/import.go b/src/cmd/compile/internal/noder/import.go index c26340c960..f13f8ca7f5 100644 --- a/src/cmd/compile/internal/noder/import.go +++ b/src/cmd/compile/internal/noder/import.go @@ -43,12 +43,12 @@ var haveLegacyImports = false // for an imported package by overloading writeNewExportFunc, then // that payload will be mapped into memory and passed to // newReadImportFunc. -var newReadImportFunc = func(data string, pkg1 *types.Pkg, check *types2.Checker, packages map[string]*types2.Package) (pkg2 *types2.Package, err error) { +var newReadImportFunc = func(data string, pkg1 *types.Pkg, env *types2.Environment, packages map[string]*types2.Package) (pkg2 *types2.Package, err error) { panic("unexpected new export data payload") } type gcimports struct { - check *types2.Checker + env *types2.Environment packages map[string]*types2.Package } @@ -61,7 +61,7 @@ func (m *gcimports) ImportFrom(path, srcDir string, mode types2.ImportMode) (*ty panic("mode must be 0") } - _, pkg, err := readImportFile(path, typecheck.Target, m.check, m.packages) + _, pkg, err := readImportFile(path, typecheck.Target, m.env, m.packages) return pkg, err } @@ -224,7 +224,7 @@ func parseImportPath(pathLit *syntax.BasicLit) (string, error) { // readImportFile reads the import file for the given package path and // returns its types.Pkg representation. If packages is non-nil, the // types2.Package representation is also returned. -func readImportFile(path string, target *ir.Package, check *types2.Checker, packages map[string]*types2.Package) (pkg1 *types.Pkg, pkg2 *types2.Package, err error) { +func readImportFile(path string, target *ir.Package, env *types2.Environment, packages map[string]*types2.Package) (pkg1 *types.Pkg, pkg2 *types2.Package, err error) { path, err = resolveImportPath(path) if err != nil { return @@ -279,7 +279,7 @@ func readImportFile(path string, target *ir.Package, check *types2.Checker, pack return } - pkg2, err = newReadImportFunc(data, pkg1, check, packages) + pkg2, err = newReadImportFunc(data, pkg1, env, packages) } else { // We only have old data. Oh well, fall back to the legacy importers. haveLegacyImports = true |