compiler: emit bytecode for unused exported functions

Exported functions should always be present in byte-code.
This will be needed later when arbitrary method calls are allowed.
This commit is contained in:
Evgenii Stratonikov 2020-07-23 17:40:49 +03:00
parent 54d7882acf
commit e87eba51f9
2 changed files with 8 additions and 2 deletions

View file

@ -1426,7 +1426,7 @@ func (c *codegen) compile(info *buildInfo, pkg *loader.PackageInfo) error {
return c.prog.Err
}
funUsage := analyzeFuncUsage(info.program.AllPackages)
funUsage := analyzeFuncUsage(pkg, info.program.AllPackages)
// Bring all imported functions into scope.
for _, pkg := range info.program.AllPackages {