Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 18 for allowsVersion (0.14 sec)

  1. src/cmd/go/internal/modload/query.go

    			qm.preferIncompatible = true
    		}
    
    	default:
    		return nil, errRevQuery
    	}
    
    	return qm, nil
    }
    
    // allowsVersion reports whether version v is allowed by the prefix, filter, and
    // AllowedFunc of qm.
    func (qm *queryMatcher) allowsVersion(ctx context.Context, v string) bool {
    	if qm.prefix != "" && !strings.HasPrefix(v, qm.prefix) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 11 22:29:11 UTC 2023
    - 44.7K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/types2/version.go

    	go_current = asGoVersion(fmt.Sprintf("go1.%d", goversion.Version))
    )
    
    // allowVersion reports whether the current package at the given position
    // is allowed to use version v. If the position is unknown, the specified
    // module version (Config.GoVersion) is used. If that version is invalid,
    // allowVersion returns true.
    func (check *Checker) allowVersion(at poser, v goVersion) bool {
    	fileVersion := check.conf.GoVersion
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 20:44:57 UTC 2024
    - 2.4K bytes
    - Viewed (0)
  3. src/go/types/version.go

    	go_current = asGoVersion(fmt.Sprintf("go1.%d", goversion.Version))
    )
    
    // allowVersion reports whether the current package at the given position
    // is allowed to use version v. If the position is unknown, the specified
    // module version (Config.GoVersion) is used. If that version is invalid,
    // allowVersion returns true.
    func (check *Checker) allowVersion(at positioner, v goVersion) bool {
    	fileVersion := check.conf.GoVersion
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 14 23:12:40 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/types2/conversions.go

    	// and the slice and array types have identical element types."
    	if s, _ := Vu.(*Slice); s != nil {
    		switch a := Tu.(type) {
    		case *Array:
    			if Identical(s.Elem(), a.Elem()) {
    				if check == nil || check.allowVersion(x, go1_20) {
    					return true
    				}
    				// check != nil
    				if cause != nil {
    					// TODO(gri) consider restructuring versionErrorf so we can use it here and below
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 18:51:00 UTC 2024
    - 9K bytes
    - Viewed (0)
  5. src/go/types/stmt.go

    // over an expression of type typ.
    // If allowVersion != nil, it is used to check the required language version.
    // If the range clause is not permitted, rangeKeyVal returns ok = false.
    // When ok = false, rangeKeyVal may also return a reason in cause.
    func rangeKeyVal(typ Type, allowVersion func(goVersion) bool) (key, val Type, cause string, isFunc, ok bool) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 30.6K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/types2/stmt.go

    // over an expression of type typ.
    // If allowVersion != nil, it is used to check the required language version.
    // If the range clause is not permitted, rangeKeyVal returns ok = false.
    // When ok = false, rangeKeyVal may also return a reason in cause.
    func rangeKeyVal(typ Type, allowVersion func(goVersion) bool) (key, val Type, cause string, isFunc, ok bool) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 30.7K bytes
    - Viewed (0)
  7. src/go/types/conversions.go

    	// and the slice and array types have identical element types."
    	if s, _ := Vu.(*Slice); s != nil {
    		switch a := Tu.(type) {
    		case *Array:
    			if Identical(s.Elem(), a.Elem()) {
    				if check == nil || check.allowVersion(x, go1_20) {
    					return true
    				}
    				// check != nil
    				if cause != nil {
    					// TODO(gri) consider restructuring versionErrorf so we can use it here and below
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 18:51:00 UTC 2024
    - 9.1K bytes
    - Viewed (0)
  8. src/go/types/generate_test.go

    					if isIdent(n.Args[0], "pos") {
    						pos := n.Args[0].Pos()
    						arg := newIdent(pos, "posn")
    						n.Args[0] = arg
    						return false
    					}
    				case "allowVersion":
    					// rewrite check.allowVersion(pos, ...) to check.allowVersion(posn, ...)
    					if isIdent(n.Args[0], "pos") {
    						pos := n.Args[0].Pos()
    						arg := newIdent(pos, "posn")
    						n.Args[0] = arg
    						return false
    					}
    				}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:01:18 UTC 2024
    - 16.5K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/types2/call.go

    		//
    		//    func g[type_parameters_of_x](func_type_of_x)
    		//
    		var args []*operand
    		var params []*Var
    		var reverse bool
    		if T != nil && sig.tparams != nil {
    			if !versionErr && !check.allowVersion(instErrPos, go1_21) {
    				if inst != nil {
    					check.versionErrorf(instErrPos, go1_21, "partially instantiated function in assignment")
    				} else {
    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

    		//
    		//    func g[type_parameters_of_x](func_type_of_x)
    		//
    		var args []*operand
    		var params []*Var
    		var reverse bool
    		if T != nil && sig.tparams != nil {
    			if !versionErr && !check.allowVersion(instErrPos, go1_21) {
    				if ix != nil {
    					check.versionErrorf(instErrPos, go1_21, "partially instantiated function in assignment")
    				} else {
    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