func NewChecker(conf *Config, fset *token.FileSet, pkg *Package, info *Info) *Checker {
	if conf == nil {
		conf = new(Config)
	}
	if info == nil {
		info = new(Info)
	}
	return &Checker{
		conf:   conf,
		fset:   fset,
		pkg:    pkg,
		Info:   info,
		objMap: make(map[Object]*declInfo),
		impMap: make(map[importKey]*Package),
	}
}
NewChecker returns a new Checker instance for a given package.
Package files may be added incrementally via checker.Files.
package types
import (
	"github.com/tcard/sgo/sgo/ast"
	"github.com/tcard/sgo/sgo/constant"
	"github.com/tcard/sgo/sgo/token"
)
const (
	debug       = false  
	trace       = false  
	debugUsable = false
)
const strict = false
type exprInfo struct {
	isLhs bool  
	mode  operandMode
	typ   *Basic
	val   constant.Value  
}
type funcInfo struct {
	name string     
	decl *declInfo  
	sig  *Signature
	body *ast.BlockStmt
}
type context struct {
	decl          *declInfo       
	scope         *Scope          
	iota          constant.Value  
	sig           *Signature      
	hasLabel      bool            
	hasCallOrRecv bool            
}
type importKey struct {
	path, dir string
}
type Checker struct {
	conf *Config
	fset *token.FileSet
	pkg  *Package
	*Info
	objMap map[Object]*declInfo    
	impMap map[importKey]*Package  
	files            []*ast.File                        
	unusedDotImports map[*Scope]map[*Package]token.Pos  
	firstErr error                  
	methods  map[string][]*Func     
	untyped  map[ast.Expr]exprInfo  
	funcs    []funcInfo             
	delayed  []func()               
	context
	pos token.Pos  
	indent int  
	reportedErrs map[string]struct{}
}
func (check *Checker) addUnusedDotImport(scope *Scope, pkg *Package, pos token.Pos) {
	mm := check.unusedDotImports
	if mm == nil {
		mm = make(map[*Scope]map[*Package]token.Pos)
		check.unusedDotImports = mm
	}
	m := mm[scope]
	if m == nil {
		m = make(map[*Package]token.Pos)
		mm[scope] = m
	}
	m[pkg] = pos
}
func (check *Checker) addDeclDep(to Object) {
	from := check.decl
	if from == nil {
		return  
	}
	if _, found := check.objMap[to]; !found {
		return  
	}
	from.addDep(to)
}
func (check *Checker) assocMethod(tname string, meth *Func) {
	m := check.methods
	if m == nil {
		m = make(map[string][]*Func)
		check.methods = m
	}
	m[tname] = append(m[tname], meth)
}
func (check *Checker) rememberUntyped(e ast.Expr, lhs bool, mode operandMode, typ *Basic, val constant.Value) {
	m := check.untyped
	if m == nil {
		m = make(map[ast.Expr]exprInfo)
		check.untyped = m
	}
	m[e] = exprInfo{lhs, mode, typ, val}
}
func (check *Checker) later(name string, decl *declInfo, sig *Signature, body *ast.BlockStmt) {
	check.funcs = append(check.funcs, funcInfo{name, decl, sig, body})
}
func (check *Checker) delay(f func()) {
	check.delayed = append(check.delayed, f)
}