Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 22 of 22 for NewVar (0.08 sec)

  1. src/cmd/compile/internal/types2/issues_test.go

    		t.Error("comparable not assignable to any")
    	}
    }
    
    func TestIssue55030(t *testing.T) {
    	// makeSig makes the signature func(typ...)
    	makeSig := func(typ Type) {
    		par := NewVar(nopos, nil, "", typ)
    		params := NewTuple(par)
    		NewSignatureType(nil, nil, nil, params, nil, true)
    	}
    
    	// makeSig must not panic for the following (example) types:
    	// []int
    	makeSig(NewSlice(Typ[Int]))
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 28.1K bytes
    - Viewed (0)
  2. src/go/types/decl.go

    				check.declare(check.scope, name, lhs[i], scopePos)
    			}
    
    		case varDecl:
    			top := len(check.delayed)
    
    			lhs0 := make([]*Var, len(d.spec.Names))
    			for i, name := range d.spec.Names {
    				lhs0[i] = NewVar(name.Pos(), pkg, name.Name, nil)
    			}
    
    			// initialize all variables
    			for i, obj := range lhs0 {
    				var lhs []*Var
    				var init ast.Expr
    				switch len(d.spec.Values) {
    				case len(d.spec.Names):
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 31K bytes
    - Viewed (0)
Back to top