Search Options

Results per page
Sort
Preferred Languages
Advance

Results 91 - 100 of 243 for decls (0.06 sec)

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

    	// Gather potential wrappers and call graph between them.
    	byObj := make(map[*types.Func]*printfWrapper)
    	var wrappers []*printfWrapper
    	for _, file := range pass.Files {
    		for _, decl := range file.Decls {
    			w := maybePrintfWrapper(pass.TypesInfo, decl)
    			if w == nil {
    				continue
    			}
    			byObj[w.obj] = w
    			wrappers = append(wrappers, w)
    		}
    	}
    
    	// Walk the graph to figure out which are really printf wrappers.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 32.5K bytes
    - Viewed (0)
  2. src/cmd/go/internal/load/test.go

    		return err
    	}
    	defer src.Close()
    	f, err := parser.ParseFile(testFileSet, filename, src, parser.ParseComments|parser.SkipObjectResolution)
    	if err != nil {
    		return err
    	}
    	for _, d := range f.Decls {
    		n, ok := d.(*ast.FuncDecl)
    		if !ok {
    			continue
    		}
    		if n.Recv != nil {
    			continue
    		}
    		name := n.Name.String()
    		switch {
    		case name == "TestMain":
    			if isTestFunc(n, "T") {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 14:01:23 UTC 2024
    - 28.2K bytes
    - Viewed (0)
  3. src/go/types/issues_test.go

    	f := mustParse(fset, src)
    
    	var conf Config
    	defs := make(map[*ast.Ident]Object)
    	_, err := conf.Check(f.Name.Name, fset, []*ast.File{f}, &Info{Defs: defs})
    	if err != nil {
    		t.Fatal(err)
    	}
    
    	m := f.Decls[0].(*ast.FuncDecl)
    	res1 := defs[m.Name].(*Func).Signature().Results().At(0)
    	res2 := defs[m.Type.Results.List[0].Names[0]].(*Var)
    
    	if res1 != res2 {
    		t.Errorf("got %s (%p) != %s (%p)", res1, res2, res1, res2)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 28.1K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/types2/decl.go

    	// in check.decl. Initialization expressions depending on other
    	// consts, vars, or functions, add dependencies to the current
    	// check.decl.
    	switch obj := obj.(type) {
    	case *Const:
    		check.decl = d // new package-level const decl
    		check.constDecl(obj, d.vtyp, d.init, d.inherited)
    	case *Var:
    		check.decl = d // new package-level var decl
    		check.varDecl(obj, d.lhs, d.vtyp, d.init)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 29.6K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/rangefunc/rewrite.go

    }
    
    // useObj returns syntax for a reference to decl, which should be its declaration.
    func (r *rewriter) useObj(obj types2.Object) *syntax.Name {
    	n := syntax.NewName(nopos, obj.Name())
    	tv := syntax.TypeAndValue{Type: obj.Type()}
    	tv.SetIsValue()
    	n.SetTypeInfo(tv)
    	r.info.Uses[n] = obj
    	return n
    }
    
    // useList is useVar for a list of decls.
    func (r *rewriter) useList(vars []types2.Object) syntax.Expr {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:05:44 UTC 2024
    - 41.6K bytes
    - Viewed (0)
  6. src/internal/types/testdata/check/decls1.go

    // Copyright 2012 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    // variable declarations
    
    package decls1
    
    import (
    	"math"
    )
    
    // Global variables without initialization
    var (
    	a, b bool
    	c byte
    	d uint8
    	r rune
    	i int
    	j, k, l int
    	x, y float32
    	xx, yy float64
    	u, v complex64
    	uu, vv complex128
    	s, t string
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 05 18:13:11 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  7. src/internal/types/testdata/check/decls4.go

    // Copyright 2016 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    // type aliases
    
    package decls4
    
    type (
    	T0 [10]int
    	T1 []byte
    	T2 struct {
    		x int
    	}
    	T3 interface{
    		m() T2
    	}
    	T4 func(int, T0) chan T2
    )
    
    type (
    	Ai = int
    	A0 = T0
    	A1 = T1
    	A2 = T2
    	A3 = T3
    	A4 = T4
    
    	A10 = [10]int
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 09 17:24:42 UTC 2023
    - 3.2K bytes
    - Viewed (0)
  8. src/go/printer/nodes.go

    		p.print(blank)
    	}
    	p.expr(d.Name)
    	p.signature(d.Type)
    	p.funcBody(p.distanceFrom(d.Pos(), startCol), vtab, d.Body)
    }
    
    func (p *printer) decl(decl ast.Decl) {
    	switch d := decl.(type) {
    	case *ast.BadDecl:
    		p.setPos(d.Pos())
    		p.print("BadDecl")
    	case *ast.GenDecl:
    		p.genDecl(d)
    	case *ast.FuncDecl:
    		p.funcDecl(d)
    	default:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 17 18:53:17 UTC 2023
    - 52.6K bytes
    - Viewed (0)
  9. src/internal/types/testdata/check/decls3.go

    // Copyright 2012 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    // embedded types
    
    package decls3
    
    import "unsafe"
    import "fmt"
    
    // fields with the same name at the same level cancel each other out
    
    func _() {
    	type (
    		T1 struct { X int }
    		T2 struct { X int }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 24 23:16:04 UTC 2023
    - 4.2K bytes
    - Viewed (0)
  10. src/internal/types/testdata/check/decls0.go

    Robert Griesemer <******@****.***> 1717017554 -0700
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 4.1K bytes
    - Viewed (0)
Back to top