aboutsummaryrefslogtreecommitdiffhomepage
path: root/loader/loader.go
diff options
context:
space:
mode:
Diffstat (limited to 'loader/loader.go')
-rw-r--r--loader/loader.go6
1 files changed, 1 insertions, 5 deletions
diff --git a/loader/loader.go b/loader/loader.go
index 6f49982db..6ced36dcd 100644
--- a/loader/loader.go
+++ b/loader/loader.go
@@ -27,8 +27,6 @@ import (
"github.com/tinygo-org/tinygo/goenv"
)
-var addInstances func(*types.Info)
-
// Program holds all packages and some metadata about the program as a whole.
type Program struct {
config *compileopts.Config
@@ -158,6 +156,7 @@ func Load(config *compileopts.Config, inputPkg string, clangHeaders string, type
EmbedGlobals: make(map[string][]*EmbedFile),
info: types.Info{
Types: make(map[ast.Expr]types.TypeAndValue),
+ Instances: make(map[*ast.Ident]types.Instance),
Defs: make(map[*ast.Ident]types.Object),
Uses: make(map[*ast.Ident]types.Object),
Implicits: make(map[ast.Node]types.Object),
@@ -165,9 +164,6 @@ func Load(config *compileopts.Config, inputPkg string, clangHeaders string, type
Selections: make(map[*ast.SelectorExpr]*types.Selection),
},
}
- if addInstances != nil {
- addInstances(&pkg.info)
- }
err := decoder.Decode(&pkg.PackageJSON)
if err != nil {
if err == io.EOF {