Search Options

Results per page
Sort
Preferred Languages
Advance

Results 61 - 70 of 210 for predeclared (1.03 sec)

  1. src/cmd/vendor/golang.org/x/tools/internal/typesinternal/errorcode.go

    	// is not a valid constant type.
    	//
    	// Example:
    	//  const c *int = 4
    	InvalidConstType
    
    	/* decls > var (+ other variable assignment codes) */
    
    	// UntypedNilUse occurs when the predeclared (untyped) value nil is used to
    	// initialize a variable declared without an explicit type.
    	//
    	// Example:
    	//  var x = nil
    	UntypedNilUse
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 02:38:00 UTC 2024
    - 34K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/types/fmt.go

    		for i, et := range tys {
    			if i > 0 {
    				b.WriteByte(',')
    			}
    			b.WriteString(et.String())
    		}
    		return
    	}
    
    	if t == AnyType || t == ByteType || t == RuneType {
    		// in %-T mode collapse predeclared aliases with their originals.
    		switch mode {
    		case fmtTypeIDName, fmtTypeID:
    			t = Types[t.Kind()]
    		default:
    			sconv2(b, t.Sym(), 'S', mode)
    			return
    		}
    	}
    	if t == ErrorType {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 12 15:41:17 UTC 2023
    - 15.7K bytes
    - Viewed (0)
  3. src/log/slog/value.go

    		}
    	}
    	return n
    }
    
    // AnyValue returns a [Value] for the supplied value.
    //
    // If the supplied value is of type Value, it is returned
    // unmodified.
    //
    // Given a value of one of Go's predeclared string, bool, or
    // (non-complex) numeric types, AnyValue returns a Value of kind
    // [KindString], [KindBool], [KindUint64], [KindInt64], or [KindFloat64].
    // The width of the original numeric type is not preserved.
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 16:12:08 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  4. src/go/types/assignments.go

    			}
    			seen[name] = true
    		}
    
    		// Use the correct obj if the ident is redeclared. The
    		// variable's scope starts after the declaration; so we
    		// must use Scope.Lookup here and call Scope.Insert
    		// (via check.declare) later.
    		if alt := scope.Lookup(name); alt != nil {
    			check.recordUse(ident, alt)
    			// redeclared object must be a variable
    			if obj, _ := alt.(*Var); obj != nil {
    				lhsVars[i] = obj
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 03 18:48:38 UTC 2024
    - 16.4K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/types2/assignments.go

    			}
    			seen[name] = true
    		}
    
    		// Use the correct obj if the ident is redeclared. The
    		// variable's scope starts after the declaration; so we
    		// must use Scope.Lookup here and call Scope.Insert
    		// (via check.declare) later.
    		if alt := scope.Lookup(name); alt != nil {
    			check.recordUse(ident, alt)
    			// redeclared object must be a variable
    			if obj, _ := alt.(*Var); obj != nil {
    				lhsVars[i] = obj
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 23 21:21:43 UTC 2024
    - 16.4K bytes
    - Viewed (0)
  6. src/internal/types/errors/codes.go

    	// InvalidConstType occurs when the underlying type in a const declaration
    	// is not a valid constant type.
    	//
    	// Example:
    	//  const c *int = 4
    	InvalidConstType
    
    	// UntypedNilUse occurs when the predeclared (untyped) value nil is used to
    	// initialize a variable declared without an explicit type.
    	//
    	// Example:
    	//  var x = nil
    	UntypedNilUse
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 03 22:50:48 UTC 2024
    - 33.7K bytes
    - Viewed (0)
  7. src/internal/types/testdata/check/builtins0.go

    	f32 = imag /* ERRORx `cannot use .* in assignment` */ (c128)
    	f64 = imag /* ERRORx `cannot use .* in assignment` */ (c64)
    	imag /* ERROR "not used" */ (c64)
    	_, _ = f32, f64
    
    	// complex type may not be predeclared
    	type C64 complex64
    	type C128 complex128
    	var x64 C64
    	var x128 C128
    	f32 = imag(x64)
    	f64 = imag(x128)
    
    	var a []complex64
    	_ = imag(a... /* ERROR "invalid use of ..." */ )
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 29.3K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/types2/api.go

    	switch tv.mode {
    	case constant_, variable, mapindex, value, nilvalue, commaok, commaerr:
    		return true
    	}
    	return false
    }
    
    // IsNil reports whether the corresponding expression denotes the
    // predeclared value nil. Depending on context, it may have been
    // given a type different from UntypedNil.
    func (tv TypeAndValue) IsNil() bool {
    	return tv.mode == nilvalue
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 13:48:53 UTC 2024
    - 17.4K bytes
    - Viewed (0)
  9. src/internal/reflectlite/type.go

    	Name() string
    
    	// PkgPath returns a defined type's package path, that is, the import path
    	// that uniquely identifies the package, such as "encoding/base64".
    	// If the type was predeclared (string, error) or not defined (*T, struct{},
    	// []int, or A where A is an alias for a non-defined type), the package path
    	// will be the empty string.
    	PkgPath() string
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 17:01:54 UTC 2024
    - 16.2K bytes
    - Viewed (0)
  10. src/go/types/api.go

    	switch tv.mode {
    	case constant_, variable, mapindex, value, commaok, commaerr:
    		return true
    	}
    	return false
    }
    
    // IsNil reports whether the corresponding expression denotes the
    // predeclared value nil.
    func (tv TypeAndValue) IsNil() bool {
    	return tv.mode == value && tv.Type == Typ[UntypedNil]
    }
    
    // Addressable reports whether the corresponding expression
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 19:57:43 UTC 2024
    - 17.2K bytes
    - Viewed (0)
Back to top