Commit 7114e999 authored by Robert Griesemer's avatar Robert Griesemer

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/152538Reviewed-by: 's avatarAlan Donovan <adonovan@google.com>
parent 159797a5
......@@ -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),
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment