},
}
info := types2.Info{
- Types: make(map[syntax.Expr]types2.TypeAndValue),
- Defs: make(map[*syntax.Name]types2.Object),
- Uses: make(map[*syntax.Name]types2.Object),
+ Types: make(map[syntax.Expr]types2.TypeAndValue),
+ Defs: make(map[*syntax.Name]types2.Object),
+ Uses: make(map[*syntax.Name]types2.Object),
+ Selections: make(map[*syntax.SelectorExpr]*types2.Selection),
// expand as needed
}
conf.Check(base.Ctxt.Pkgpath, files, &info)
return p.typeInfo.Uses[x]
}
+// sel returns the selection information for the given selector expression.
+func (p *noder) sel(x *syntax.SelectorExpr) *types2.Selection {
+ return p.typeInfo.Selections[x]
+}
+
func (p *noder) funcBody(fn *ir.Func, block *syntax.BlockStmt) {
oldScope := p.scope
p.scope = 0