Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 49 for typexpr (0.39 sec)

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

    			// be a placeholder for a receiver type parameter. In this case we can
    			// resolve its type and object from Checker.recvTParamMap.
    			if tpar := check.recvTParamMap[e]; tpar != nil {
    				x.mode = typexpr
    				x.typ = tpar
    			} else {
    				check.error(e, InvalidBlank, "cannot use _ as value or type")
    			}
    		} else {
    			check.errorf(e, UndeclaredName, "undefined: %s", e.Value)
    		}
    		return
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 16.6K bytes
    - Viewed (0)
  2. src/go/types/typexpr.go

    			// be a placeholder for a receiver type parameter. In this case we can
    			// resolve its type and object from Checker.recvTParamMap.
    			if tpar := check.recvTParamMap[e]; tpar != nil {
    				x.mode = typexpr
    				x.typ = tpar
    			} else {
    				check.error(e, InvalidBlank, "cannot use _ as value or type")
    			}
    		} else {
    			check.errorf(e, UndeclaredName, "undefined: %s", e.Name)
    		}
    		return
    	case universeComparable:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 16.3K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/types2/operand.go

    		case builtin:
    			expr = predeclaredFuncs[x.id].name
    		case typexpr:
    			expr = TypeString(x.typ, qf)
    		case constant_:
    			expr = x.val.String()
    		}
    	}
    
    	// <expr> (
    	if expr != "" {
    		buf.WriteString(expr)
    		buf.WriteString(" (")
    	}
    
    	// <untyped kind>
    	hasType := false
    	switch x.mode {
    	case invalid, novalue, builtin, typexpr:
    		// no type
    	default:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 21:17:10 UTC 2024
    - 11K bytes
    - Viewed (0)
  4. src/go/types/operand.go

    		case builtin:
    			expr = predeclaredFuncs[x.id].name
    		case typexpr:
    			expr = TypeString(x.typ, qf)
    		case constant_:
    			expr = x.val.String()
    		}
    	}
    
    	// <expr> (
    	if expr != "" {
    		buf.WriteString(expr)
    		buf.WriteString(" (")
    	}
    
    	// <untyped kind>
    	hasType := false
    	switch x.mode {
    	case invalid, novalue, builtin, typexpr:
    		// no type
    	default:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 21:17:10 UTC 2024
    - 11.1K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/types2/call.go

    	} else {
    		check.exprOrType(x, call.Fun, true)
    	}
    	// x.typ may be generic
    
    	switch x.mode {
    	case invalid:
    		check.use(call.ArgList...)
    		x.expr = call
    		return statement
    
    	case typexpr:
    		// conversion
    		check.nonGeneric(nil, x)
    		if x.mode == invalid {
    			return conversion
    		}
    		T := x.typ
    		x.mode = invalid
    		switch n := len(call.ArgList); n {
    		case 0:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 31.5K bytes
    - Viewed (0)
  6. src/go/types/call.go

    	} else {
    		check.exprOrType(x, call.Fun, true)
    	}
    	// x.typ may be generic
    
    	switch x.mode {
    	case invalid:
    		check.use(call.Args...)
    		x.expr = call
    		return statement
    
    	case typexpr:
    		// conversion
    		check.nonGeneric(nil, x)
    		if x.mode == invalid {
    			return conversion
    		}
    		T := x.typ
    		x.mode = invalid
    		switch n := len(call.Args); n {
    		case 0:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 33.5K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/types2/index.go

    	// x may be generic
    
    	switch x.mode {
    	case invalid:
    		check.use(e.Index)
    		return false
    
    	case typexpr:
    		// type instantiation
    		x.mode = invalid
    		// TODO(gri) here we re-evaluate e.X - try to avoid this
    		x.typ = check.varType(e)
    		if isValid(x.typ) {
    			x.mode = typexpr
    		}
    		return false
    
    	case value:
    		if sig, _ := under(x.typ).(*Signature); sig != nil && sig.TypeParams().Len() > 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 15 16:16:58 UTC 2023
    - 11.5K bytes
    - Viewed (0)
  8. src/go/types/index.go

    	// x may be generic
    
    	switch x.mode {
    	case invalid:
    		check.use(e.Indices...)
    		return false
    
    	case typexpr:
    		// type instantiation
    		x.mode = invalid
    		// TODO(gri) here we re-evaluate e.X - try to avoid this
    		x.typ = check.varType(e.Orig)
    		if isValid(x.typ) {
    			x.mode = typexpr
    		}
    		return false
    
    	case value:
    		if sig, _ := under(x.typ).(*Signature); sig != nil && sig.TypeParams().Len() > 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jan 22 16:17:05 UTC 2024
    - 11.2K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/types2/signature.go

    	// record the type for ...T.
    	if variadic {
    		last := params[len(params)-1]
    		last.typ = &Slice{elem: last.typ}
    		check.recordTypeAndValue(list[len(list)-1].Type, typexpr, last.typ, nil)
    	}
    
    	return
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 21:33:05 UTC 2024
    - 12.6K bytes
    - Viewed (0)
  10. src/go/types/signature.go

    	// record the type for ...T.
    	if variadic {
    		last := params[len(params)-1]
    		last.typ = &Slice{elem: last.typ}
    		check.recordTypeAndValue(list.List[len(list.List)-1].Type, typexpr, last.typ, nil)
    	}
    
    	return
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 29 22:06:18 UTC 2024
    - 13K bytes
    - Viewed (0)
Back to top