Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 105 for SelectorExpr (0.3 sec)

  1. src/go/types/errorcalls_test.go

    		t.Fatal(err)
    	}
    
    	for _, file := range files {
    		ast.Inspect(file, func(n ast.Node) bool {
    			call, _ := n.(*ast.CallExpr)
    			if call == nil {
    				return true
    			}
    			selx, _ := call.Fun.(*ast.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)
  2. src/cmd/compile/internal/typecheck/expr.go

    func XDotMethod(pos src.XPos, x ir.Node, sym *types.Sym, callee bool) *ir.SelectorExpr {
    	n := ir.NewSelectorExpr(pos, ir.OXDOT, x, sym)
    	if callee {
    		n = Callee(n).(*ir.SelectorExpr)
    		if n.Op() != ir.ODOTMETH && n.Op() != ir.ODOTINTER {
    			base.FatalfAt(pos, "unexpected result op: %v (%v)", n.Op(), n)
    		}
    	} else {
    		n = Expr(n).(*ir.SelectorExpr)
    		if n.Op() != ir.OMETHVALUE {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 04 14:29:45 UTC 2024
    - 23.1K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/walk/expr.go

    			return n
    		}
    		a := ir.Copy(n).(*ir.UnaryExpr)
    		a.X = l
    		return walkExpr(typecheck.Expr(a), init)
    
    	case ir.ODOT, ir.ODOTPTR:
    		n := n.(*ir.SelectorExpr)
    		l := safeExpr(n.X, init)
    		if l == n.X {
    			return n
    		}
    		a := ir.Copy(n).(*ir.SelectorExpr)
    		a.X = l
    		return walkExpr(typecheck.Expr(a), init)
    
    	case ir.ODEREF:
    		n := n.(*ir.StarExpr)
    		l := safeExpr(n.X, init)
    		if l == n.X {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:34:01 UTC 2024
    - 27.6K bytes
    - Viewed (0)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. 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)
  9. 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)
  10. 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)
Back to top