Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 18 for tparamList (0.58 sec)

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

    	}).describef(obj, "validType(%s)", obj.Name())
    
    	// First type parameter, or nil.
    	var tparam0 *syntax.Field
    	if len(tdecl.TParamList) > 0 {
    		tparam0 = tdecl.TParamList[0]
    	}
    
    	// alias declaration
    	if tdecl.Alias {
    		// Report highest version requirement first so that fixing a version issue
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 29.6K bytes
    - Viewed (0)
  2. src/go/internal/gcimporter/iimport.go

    }
    
    func (r *importReader) signature(recv *types.Var, rparams, tparams []*types.TypeParam) *types.Signature {
    	params := r.paramList()
    	results := r.paramList()
    	variadic := params.Len() > 0 && r.bool()
    	return types.NewSignatureType(recv, rparams, tparams, params, results, variadic)
    }
    
    func (r *importReader) tparamList() []*types.TypeParam {
    	n := r.uint64()
    	if n == 0 {
    		return nil
    	}
    	xs := make([]*types.TypeParam, n)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 19.2K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/types2/typestring.go

    			// instantiated type
    			w.typeList(t.inst.targs.list())
    		} else if w.ctxt == nil && t.TypeParams().Len() != 0 { // For type hashing, don't need to format the TypeParams
    			// parameterized type
    			w.tParamList(t.TypeParams().list())
    		}
    
    	case *TypeParam:
    		if t.obj == nil {
    			w.error("unnamed type parameter")
    			break
    		}
    		if i := tparamIndex(w.tparams.list(), t); i >= 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:01:18 UTC 2024
    - 12.2K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/syntax/walk.go

    		}
    
    	case *TypeDecl:
    		w.node(n.Name)
    		w.fieldList(n.TParamList)
    		w.node(n.Type)
    
    	case *VarDecl:
    		w.nameList(n.NameList)
    		if n.Type != nil {
    			w.node(n.Type)
    		}
    		if n.Values != nil {
    			w.node(n.Values)
    		}
    
    	case *FuncDecl:
    		if n.Recv != nil {
    			w.node(n.Recv)
    		}
    		w.node(n.Name)
    		w.fieldList(n.TParamList)
    		w.node(n.Type)
    		if n.Body != nil {
    			w.node(n.Body)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 17 19:55:04 UTC 2023
    - 5.7K bytes
    - Viewed (0)
  5. src/go/types/typestring.go

    			// instantiated type
    			w.typeList(t.inst.targs.list())
    		} else if w.ctxt == nil && t.TypeParams().Len() != 0 { // For type hashing, don't need to format the TypeParams
    			// parameterized type
    			w.tParamList(t.TypeParams().list())
    		}
    
    	case *TypeParam:
    		if t.obj == nil {
    			w.error("unnamed type parameter")
    			break
    		}
    		if i := tparamIndex(w.tparams.list(), t); i >= 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:01:18 UTC 2024
    - 12.3K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/syntax/nodes.go

    		Values   Expr // nil means no values
    		decl
    	}
    
    	// Name Type
    	TypeDecl struct {
    		Group      *Group // nil means not part of a group
    		Pragma     Pragma
    		Name       *Name
    		TParamList []*Field // nil means no type parameters
    		Alias      bool
    		Type       Expr
    		decl
    	}
    
    	// NameList Type
    	// NameList Type = Values
    	// NameList      = Values
    	VarDecl struct {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 20 14:52:38 UTC 2023
    - 9K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/syntax/printer.go

    		}
    		if n.Values != nil {
    			p.print(blank, _Assign, blank, n.Values)
    		}
    
    	case *TypeDecl:
    		if n.Group == nil {
    			p.print(_Type, blank)
    		}
    		p.print(n.Name)
    		if n.TParamList != nil {
    			p.printParameterList(n.TParamList, _Type)
    		}
    		p.print(blank)
    		if n.Alias {
    			p.print(_Assign, blank)
    		}
    		p.print(n.Type)
    
    	case *VarDecl:
    		if n.Group == nil {
    			p.print(_Var, blank)
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Aug 24 07:17:27 UTC 2023
    - 21.5K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/types2/resolver.go

    						code := InvalidInitDecl
    						if name == "main" {
    							code = InvalidMainDecl
    						}
    						if len(s.TParamList) != 0 {
    							check.softErrorf(s.TParamList[0], code, "func %s must have no type parameters", name)
    							hasTParamError = true
    						}
    						if t := s.Type; len(t.ParamList) != 0 || len(t.ResultList) != 0 {
    							check.softErrorf(s.Name, code, "func %s must have no arguments and no return values", name)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 18 14:10:44 UTC 2024
    - 26.3K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/syntax/parser.go

    	typ := new(FuncType)
    	typ.pos = p.pos()
    
    	var tparamList []*Field
    	if p.got(_Lbrack) {
    		if context != "" {
    			// accept but complain
    			p.syntaxErrorAt(typ.pos, context+" must have no type parameters")
    		}
    		if p.tok == _Rbrack {
    			p.syntaxError("empty type parameter list")
    			p.next()
    		} else {
    			tparamList = p.paramList(nil, nil, _Rbrack, true)
    		}
    	}
    
    	p.want(_Lparen)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 62.9K bytes
    - Viewed (0)
  10. src/go/types/object.go

    		case *Basic:
    			// Don't print anything more for basic types since there's
    			// no more information.
    			return
    		case *Named:
    			if t.TypeParams().Len() > 0 {
    				newTypeWriter(buf, qf).tParamList(t.TypeParams().list())
    			}
    		}
    		if tname.IsAlias() {
    			buf.WriteString(" =")
    			if alias, ok := typ.(*Alias); ok { // materialized? (gotypesalias=1)
    				typ = alias.fromRHS
    			}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 20:08:23 UTC 2024
    - 20.1K bytes
    - Viewed (0)
Back to top