Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for ObjectOf (0.2 sec)

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

    					NewText: buf.Bytes(),
    				}},
    			}},
    		})
    	})
    	return nil, nil
    }
    
    func isSignalNotify(info *types.Info, call *ast.CallExpr) bool {
    	check := func(id *ast.Ident) bool {
    		obj := info.ObjectOf(id)
    		return obj.Name() == "Notify" && obj.Pkg().Path() == "os/signal"
    	}
    	switch fun := call.Fun.(type) {
    	case *ast.SelectorExpr:
    		return check(fun.Sel)
    	case *ast.Ident:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 09 01:28:01 UTC 2023
    - 3.8K bytes
    - Viewed (0)
  2. src/go/types/api.go

    		return t.Type
    	}
    	if id, _ := e.(*ast.Ident); id != nil {
    		if obj := info.ObjectOf(id); obj != nil {
    			return obj.Type()
    		}
    	}
    	return nil
    }
    
    // ObjectOf returns the object denoted by the specified id,
    // or nil if not found.
    //
    // If id is an embedded struct field, [Info.ObjectOf] returns the field (*[Var])
    // it defines, not the type (*[TypeName]) it uses.
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 19:57:43 UTC 2024
    - 17.2K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/types2/api.go

    			return tv.Type
    		}
    	}
    
    	if id, _ := e.(*syntax.Name); id != nil {
    		if obj := info.ObjectOf(id); obj != nil {
    			return obj.Type()
    		}
    	}
    	return nil
    }
    
    // ObjectOf returns the object denoted by the specified id,
    // or nil if not found.
    //
    // If id is an embedded struct field, ObjectOf returns the field (*Var)
    // it defines, not the type (*TypeName) it uses.
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 13:48:53 UTC 2024
    - 17.4K bytes
    - Viewed (0)
  4. src/internal/types/errors/generrordocs.go

    		if !ok || decl.Tok != token.CONST {
    			continue
    		}
    		for _, spec := range decl.Specs {
    			spec, ok := spec.(*ast.ValueSpec)
    			if !ok || len(spec.Names) == 0 {
    				continue
    			}
    			obj := info.ObjectOf(spec.Names[0])
    			if named, ok := obj.Type().(*Named); ok && named.Obj().Name() == "Code" {
    				if len(spec.Names) != 1 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 24 03:14:42 UTC 2023
    - 3K bytes
    - Viewed (0)
  5. src/internal/types/errors/codes_test.go

    		if !ok || decl.Tok != token.CONST {
    			continue
    		}
    		for _, spec := range decl.Specs {
    			spec, ok := spec.(*ast.ValueSpec)
    			if !ok || len(spec.Names) == 0 {
    				continue
    			}
    			obj := info.ObjectOf(spec.Names[0])
    			if named, ok := obj.Type().(*Named); ok && named.Obj().Name() == "Code" {
    				if len(spec.Names) != 1 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 18 20:41:45 UTC 2022
    - 4.9K bytes
    - Viewed (0)
  6. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/loopclosure/loopclosure.go

    			return true
    		}
    		// Find the variables updated by the loop statement.
    		var vars []types.Object
    		addVar := func(expr ast.Expr) {
    			if id, _ := expr.(*ast.Ident); id != nil {
    				if obj := pass.TypesInfo.ObjectOf(id); obj != nil {
    					vars = append(vars, obj)
    				}
    			}
    		}
    		var body *ast.BlockStmt
    		switch n := n.(type) {
    		case *ast.File:
    			// Only traverse the file if its goversion is strictly before go1.22.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 10.3K bytes
    - Viewed (0)
  7. api/go1.5.txt

    pkg go/types, method (*Func) Pos() token.Pos
    pkg go/types, method (*Func) Scope() *Scope
    pkg go/types, method (*Func) String() string
    pkg go/types, method (*Func) Type() Type
    pkg go/types, method (*Info) ObjectOf(*ast.Ident) Object
    pkg go/types, method (*Info) TypeOf(ast.Expr) Type
    pkg go/types, method (*Initializer) String() string
    pkg go/types, method (*Interface) Complete() *Interface
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jul 30 21:14:09 UTC 2015
    - 46.6K bytes
    - Viewed (0)
  8. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/printf/printf.go

    			}
    
    			return true
    		})
    	}
    	return nil, nil
    }
    
    func match(info *types.Info, arg ast.Expr, param *types.Var) bool {
    	id, ok := arg.(*ast.Ident)
    	return ok && info.ObjectOf(id) == param
    }
    
    // checkPrintfFwd checks that a printf-forwarding wrapper is forwarding correctly.
    // It diagnoses writing fmt.Printf(format, args) instead of fmt.Printf(format, args...).
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 32.5K bytes
    - Viewed (0)
  9. src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go

    		{"(*Func).Parent", Method, 5},
    		{"(*Func).Pkg", Method, 5},
    		{"(*Func).Pos", Method, 5},
    		{"(*Func).Scope", Method, 5},
    		{"(*Func).String", Method, 5},
    		{"(*Func).Type", Method, 5},
    		{"(*Info).ObjectOf", Method, 5},
    		{"(*Info).PkgNameOf", Method, 22},
    		{"(*Info).TypeOf", Method, 5},
    		{"(*Initializer).String", Method, 5},
    		{"(*Interface).Complete", Method, 5},
    		{"(*Interface).Embedded", Method, 5},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 534.2K bytes
    - Viewed (0)
  10. docs/fr/docs/tutorial/body.md

    Et vous obtenez aussi de la vérification d'erreur pour les opérations incorrectes de types :
    
    <img src="/img/tutorial/body/image04.png">
    
    Ce n'est pas un hasard, ce framework entier a été bâti avec ce design comme objectif.
    
    Et cela a été rigoureusement testé durant la phase de design, avant toute implémentation, pour s'assurer que cela fonctionnerait avec tous les éditeurs.
    
    Des changements sur Pydantic ont même été faits pour supporter cela.
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri Mar 22 01:42:11 UTC 2024
    - 7.8K bytes
    - Viewed (0)
Back to top