Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 138 for predeclared (0.24 sec)

  1. src/go/internal/gcimporter/iimport.go

    		},
    	}
    	defer p.fake.setLines() // set lines for files in fset
    
    	for i, pt := range predeclared {
    		p.typCache[uint64(i)] = pt
    	}
    	// Special handling for "any", whose representation may be changed by the
    	// gotypesalias GODEBUG variable.
    	p.typCache[uint64(len(predeclared))] = types.Universe.Lookup("any").Type()
    
    	pkgList := make([]*types.Package, r.uint64())
    	for i := range pkgList {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 19.2K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/types2/typestring.go

    				w.string(subscript(t.id))
    			}
    			// If the type parameter name is the same as a predeclared object
    			// (say int), point out where it is declared to avoid confusing
    			// error messages. This doesn't need to be super-elegant; we just
    			// need a clear indication that this is not a predeclared name.
    			if w.ctxt == nil && Universe.Lookup(t.obj.name) != nil {
    				if isTypes2 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:01:18 UTC 2024
    - 12.2K bytes
    - Viewed (0)
  3. src/go/types/typestring.go

    				w.string(subscript(t.id))
    			}
    			// If the type parameter name is the same as a predeclared object
    			// (say int), point out where it is declared to avoid confusing
    			// error messages. This doesn't need to be super-elegant; we just
    			// need a clear indication that this is not a predeclared name.
    			if w.ctxt == nil && Universe.Lookup(t.obj.name) != nil {
    				if isTypes2 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:01:18 UTC 2024
    - 12.3K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/types2/object_test.go

    )
    
    func TestIsAlias(t *testing.T) {
    	check := func(obj *TypeName, want bool) {
    		if got := obj.IsAlias(); got != want {
    			t.Errorf("%v: got IsAlias = %v; want %v", obj, got, want)
    		}
    	}
    
    	// predeclared types
    	check(Unsafe.Scope().Lookup("Pointer").(*TypeName), false)
    	for _, name := range Universe.Names() {
    		if obj, _ := Universe.Lookup(name).(*TypeName); obj != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 18 14:10:44 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  5. src/go/types/object_test.go

    )
    
    func TestIsAlias(t *testing.T) {
    	check := func(obj *TypeName, want bool) {
    		if got := obj.IsAlias(); got != want {
    			t.Errorf("%v: got IsAlias = %v; want %v", obj, got, want)
    		}
    	}
    
    	// predeclared types
    	check(Unsafe.Scope().Lookup("Pointer").(*TypeName), false)
    	for _, name := range Universe.Names() {
    		if obj, _ := Universe.Lookup(name).(*TypeName); obj != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 18 14:10:44 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  6. src/internal/types/testdata/spec/assignability.go

    ](X0 TP0, X1 TP1, X2 TP2) {
    	i = X0
    	I = X0
    	c = X1
    	C = X1 // ERRORx `cannot use X1 .* as Chan value`
    	c = X2 // ERRORx `.* cannot assign chan byte \(in TP2\) to (chan int|_Chan.*)`
    }
    
    // "x is the predeclared identifier nil and T is a pointer, function, slice, map, channel, or interface type"
    func _[TP Interface](X TP) {
    	b = nil // ERROR "cannot use nil"
    	a = nil // ERROR "cannot use nil"
    	l = nil
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 09 17:24:42 UTC 2023
    - 5.1K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/types2/typexpr.go

    		}
    		return
    	case universeComparable:
    		if !check.verifyVersionf(e, go1_18, "predeclared %s", e.Value) {
    			return // avoid follow-on errors
    		}
    	}
    	// Because the representation of any depends on gotypesalias, we don't check
    	// pointer identity here.
    	if obj.Name() == "any" && obj.Parent() == Universe {
    		if !check.verifyVersionf(e, go1_18, "predeclared %s", e.Value) {
    			return // avoid follow-on errors
    		}
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 16.6K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/types/type.go

    var Types [NTYPE]*Type
    
    var (
    	// Predeclared alias types. These are actually created as distinct
    	// defined types for better error messages, but are then specially
    	// treated as identical to their respective underlying types.
    	AnyType  *Type
    	ByteType *Type
    	RuneType *Type
    
    	// Predeclared error interface type.
    	ErrorType *Type
    	// Predeclared comparable interface type.
    	ComparableType *Type
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 04 14:29:45 UTC 2024
    - 49.5K bytes
    - Viewed (0)
  9. src/go/types/typexpr.go

    		}
    		return
    	case universeComparable:
    		if !check.verifyVersionf(e, go1_18, "predeclared %s", e.Name) {
    			return // avoid follow-on errors
    		}
    	}
    	// Because the representation of any depends on gotypesalias, we don't check
    	// pointer identity here.
    	if obj.Name() == "any" && obj.Parent() == Universe {
    		if !check.verifyVersionf(e, go1_18, "predeclared %s", e.Name) {
    			return // avoid follow-on errors
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 16.3K bytes
    - Viewed (0)
  10. doc/go_spec.html

    <code>real</code> and <code>imag</code> applied to a complex constant
    and <code>complex</code> applied to numeric constants.
    The boolean truth values are represented by the predeclared constants
    <code>true</code> and <code>false</code>. The predeclared identifier
    <a href="#Iota">iota</a> denotes an integer constant.
    </p>
    
    <p>
    In general, complex constants are a form of
    <a href="#Constant_expressions">constant expression</a>
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 21:07:21 UTC 2024
    - 281.5K bytes
    - Viewed (1)
Back to top