mirror of https://github.com/dmarkham/enumer.git
import from source
This commit is contained in:
parent
fbb114e61f
commit
7f992c627d
|
@ -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.
|
// check type-checks the package. The package must be OK to proceed.
|
||||||
func (pkg *Package) check(fs *token.FileSet, astFiles []*ast.File) {
|
func (pkg *Package) check(fs *token.FileSet, astFiles []*ast.File) {
|
||||||
pkg.defs = make(map[*ast.Ident]types.Object)
|
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{
|
info := &types.Info{
|
||||||
Defs: pkg.defs,
|
Defs: pkg.defs,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue