diff --git a/stringer.go b/stringer.go index ccfb304..a9273e9 100644 --- a/stringer.go +++ b/stringer.go @@ -273,7 +273,7 @@ func (g *Generator) parsePackage(directory string, names []string, text interfac // check type-checks the package. The package must be OK to proceed. func (pkg *Package) check(fs *token.FileSet, astFiles []*ast.File) { pkg.defs = make(map[*ast.Ident]types.Object) - config := types.Config{Importer: importer.Default(), FakeImportC: true} + config := types.Config{Importer: importer.For("source", nil), FakeImportC: true} info := &types.Info{ Defs: pkg.defs, }