Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for funcLitInScope (0.12 sec)

  1. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/testinggoroutine/util.go

    		id, _ := x.(*ast.Ident)
    		return id
    	case *ast.Ident:
    		return fun
    	default:
    		return nil
    	}
    }
    
    // funcLitInScope returns a FuncLit that id is at least initially assigned to.
    //
    // TODO: This is closely tied to id.Obj which is deprecated.
    func funcLitInScope(id *ast.Ident) *ast.FuncLit {
    	// Compare to (*ast.Object).Pos().
    	if id.Obj == nil {
    		return nil
    	}
    	var rhs ast.Expr
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 2.4K bytes
    - Viewed (0)
  2. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/testinggoroutine/testinggoroutine.go

    func goAsyncCall(info *types.Info, goStmt *ast.GoStmt, toDecl func(*types.Func) *ast.FuncDecl) *asyncCall {
    	call := goStmt.Call
    
    	fun := astutil.Unparen(call.Fun)
    	if id := funcIdent(fun); id != nil {
    		if lit := funcLitInScope(id); lit != nil {
    			return &asyncCall{region: lit, async: goStmt, scope: nil, fun: fun}
    		}
    	}
    
    	if fn := typeutil.StaticCallee(info, call); fn != nil { // static call or method in the package?
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 7.8K bytes
    - Viewed (0)
Back to top