mirror of
https://github.com/golang/go
synced 2024-11-23 06:30:06 -07:00
go/types: use new importer.ForCompiler for gotype command
This will produce better error messages (position information) for errors referring to imported objects. Change-Id: I24646ae803e6b8f78e9240310a858d4095e9463d Reviewed-on: https://go-review.googlesource.com/c/152538 Reviewed-by: Alan Donovan <adonovan@google.com>
This commit is contained in:
parent
159797a5fc
commit
7114e9997b
@ -297,7 +297,7 @@ func checkPkgFiles(files []*ast.File) {
|
||||
}
|
||||
report(err)
|
||||
},
|
||||
Importer: importer.For(*compiler, nil),
|
||||
Importer: importer.ForCompiler(fset, *compiler, nil),
|
||||
Sizes: types.SizesFor(build.Default.Compiler, build.Default.GOARCH),
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user