Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 97 for SelectorExpr (0.16 sec)

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

    // either a function of the net/http package or a method of http.Client that
    // returns (*http.Response, error).
    func isHTTPFuncOrMethodOnClient(info *types.Info, expr *ast.CallExpr) bool {
    	fun, _ := expr.Fun.(*ast.SelectorExpr)
    	sig, _ := info.Types[fun].Type.(*types.Signature)
    	if sig == nil {
    		return false // the call is not of the form x.f()
    	}
    
    	res := sig.Results()
    	if res.Len() != 2 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 5K bytes
    - Viewed (0)
  2. src/go/types/self_test.go

    				Types:      make(map[ast.Expr]TypeAndValue),
    				Defs:       make(map[*ast.Ident]Object),
    				Uses:       make(map[*ast.Ident]Object),
    				Implicits:  make(map[ast.Node]Object),
    				Selections: make(map[*ast.SelectorExpr]*Selection),
    				Scopes:     make(map[ast.Node]*Scope),
    			}
    		}
    		if _, err := conf.Check(path, fset, files, info); err != nil {
    			b.Fatal(err)
    		}
    	}
    	b.StopTimer()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 23 19:39:00 UTC 2023
    - 2.8K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/types2/errorcalls_test.go

    		t.Fatal(err)
    	}
    
    	for _, file := range files {
    		syntax.Inspect(file, func(n syntax.Node) bool {
    			call, _ := n.(*syntax.CallExpr)
    			if call == nil {
    				return true
    			}
    			selx, _ := call.Fun.(*syntax.SelectorExpr)
    			if selx == nil {
    				return true
    			}
    			if !(isName(selx.X, "check") && isName(selx.Sel, "errorf")) {
    				return true
    			}
    			// check.errorf calls should have at least errorfMinArgCount arguments:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Dec 15 21:57:36 UTC 2023
    - 2.2K bytes
    - Viewed (0)
  4. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/nilfunc/nilfunc.go

    			e2 = e.X
    		default:
    			return
    		}
    
    		// Only want identifiers or selector expressions.
    		var obj types.Object
    		switch v := e2.(type) {
    		case *ast.Ident:
    			obj = pass.TypesInfo.Uses[v]
    		case *ast.SelectorExpr:
    			obj = pass.TypesInfo.Uses[v.Sel]
    		case *ast.IndexExpr, *ast.IndexListExpr:
    			// Check generic functions such as "f[T1,T2]".
    			x, _, _, _ := typeparams.UnpackIndexExpr(v)
    			if id, ok := x.(*ast.Ident); ok {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 18 21:28:13 UTC 2023
    - 2K bytes
    - Viewed (0)
  5. src/runtime/align_test.go

    	checked map[string]bool
    	t       *testing.T
    }
    
    func (v *Visitor) Visit(n ast.Node) ast.Visitor {
    	c, ok := n.(*ast.CallExpr)
    	if !ok {
    		return v
    	}
    	f, ok := c.Fun.(*ast.SelectorExpr)
    	if !ok {
    		return v
    	}
    	p, ok := f.X.(*ast.Ident)
    	if !ok {
    		return v
    	}
    	if p.Name != "atomic" {
    		return v
    	}
    	if !strings.HasSuffix(f.Sel.Name, "64") {
    		return v
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Feb 08 14:52:12 UTC 2023
    - 5.4K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/walk/closure.go

    		var outer ir.Node
    		outer = v.Outer
    		if !v.Byval() {
    			outer = typecheck.NodAddrAt(fn.Pos(), outer)
    		}
    		args[i] = typecheck.Expr(outer)
    	}
    	return args
    }
    
    func walkMethodValue(n *ir.SelectorExpr, init *ir.Nodes) ir.Node {
    	// Create closure in the form of a composite literal.
    	// For x.M with receiver (x) type T, the generated code looks like:
    	//
    	//	clos = &struct{F uintptr; R T}{T.M·f, x}
    	//
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Nov 20 15:56:08 UTC 2023
    - 6.5K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/syntax/positions.go

    		case *CompositeLit:
    			if n.Type != nil {
    				m = n.Type
    				continue
    			}
    			return n.Pos()
    		case *KeyValueExpr:
    			m = n.Key
    		// case *FuncLit:
    		// case *ParenExpr:
    		case *SelectorExpr:
    			m = n.X
    		case *IndexExpr:
    			m = n.X
    		// case *SliceExpr:
    		case *AssertExpr:
    			m = n.X
    		case *TypeSwitchGuard:
    			if n.Lhs != nil {
    				m = n.Lhs
    				continue
    			}
    			m = n.X
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 17:49:19 UTC 2024
    - 6.5K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/types2/self_test.go

    				Types:      make(map[syntax.Expr]TypeAndValue),
    				Defs:       make(map[*syntax.Name]Object),
    				Uses:       make(map[*syntax.Name]Object),
    				Implicits:  make(map[syntax.Node]Object),
    				Selections: make(map[*syntax.SelectorExpr]*Selection),
    				Scopes:     make(map[syntax.Node]*Scope),
    			}
    		}
    		if _, err := conf.Check(path, files, info); err != nil {
    			b.Fatal(err)
    		}
    	}
    	b.StopTimer()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 23 19:39:00 UTC 2023
    - 2.8K bytes
    - Viewed (0)
  9. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/testinggoroutine/testinggoroutine.go

    		}
    	}
    
    	return false
    }
    
    func typeIsTestingDotTOrB(expr ast.Expr) (string, bool) {
    	starExpr, ok := expr.(*ast.StarExpr)
    	if !ok {
    		return "", false
    	}
    	selExpr, ok := starExpr.X.(*ast.SelectorExpr)
    	if !ok {
    		return "", false
    	}
    	varPkg := selExpr.X.(*ast.Ident)
    	if varPkg.Name != "testing" {
    		return "", false
    	}
    
    	varTypeName := selExpr.Sel.Name
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 7.8K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/typecheck/typecheck.go

    		n := n.(*ir.UnaryExpr)
    		return tcUnaryArith(n)
    
    	// exprs
    	case ir.OCOMPLIT:
    		return tcCompLit(n.(*ir.CompLitExpr))
    
    	case ir.OXDOT, ir.ODOT:
    		n := n.(*ir.SelectorExpr)
    		return tcDot(n, top)
    
    	case ir.ODOTTYPE:
    		n := n.(*ir.TypeAssertExpr)
    		return tcDotType(n)
    
    	case ir.OINDEX:
    		n := n.(*ir.IndexExpr)
    		return tcIndex(n)
    
    	case ir.ORECV:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 20 19:08:34 UTC 2024
    - 30.5K bytes
    - Viewed (0)
Back to top