Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 105 for typexpr (0.17 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/internal/types/testdata/fixedbugs/issue57522.go

    type V1 = S1[any]
    
    type S2[T any] struct{}
    type V2 = S2[any]
    func (fs *S2[T]) M(x V2.M /* ERROR "V2.M is not a type" */ ) {}
    
    // The following still panics, as the selector is reached from check.expr
    // rather than check.typexpr. TODO(rfindley): fix this.
    // type X[T any] int
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 11 22:29:34 UTC 2023
    - 728 bytes
    - Viewed (0)
  6. src/go/types/union.go

    				u = Typ[Invalid]
    			}
    		} else {
    			terms = append(terms, term)
    			u = &Union{terms}
    		}
    
    		if i > 0 {
    			check.recordTypeAndValue(blist[i-1], typexpr, u, nil)
    		}
    	}
    
    	if !isValid(u) {
    		return u
    	}
    
    	// Check validity of terms.
    	// Do this check later because it requires types to be set up.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 12:02:03 UTC 2023
    - 6.2K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/types2/union.go

    				u = Typ[Invalid]
    			}
    		} else {
    			terms = append(terms, term)
    			u = &Union{terms}
    		}
    
    		if i > 0 {
    			check.recordTypeAndValue(blist[i-1], typexpr, u, nil)
    		}
    	}
    
    	if !isValid(u) {
    		return u
    	}
    
    	// Check validity of terms.
    	// Do this check later because it requires types to be set up.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 15 16:16:58 UTC 2023
    - 6.3K bytes
    - Viewed (0)
  8. src/go/types/expr.go

    	check.rawExpr(T, x, e, nil, false)
    	check.exclude(x, 1<<novalue|1<<builtin|1<<typexpr)
    	check.singleValue(x)
    }
    
    // genericExpr is like expr but the result may also be generic.
    func (check *Checker) genericExpr(x *operand, e ast.Expr) {
    	check.rawExpr(nil, x, e, nil, true)
    	check.exclude(x, 1<<novalue|1<<builtin|1<<typexpr)
    	check.singleValue(x)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 02:09:54 UTC 2024
    - 49.7K bytes
    - Viewed (0)
  9. 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)
  10. 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)
Back to top