Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 210 for predeclared (1.48 sec)

  1. src/go/ast/scope.go

    			return d.Label.Pos()
    		}
    	case *AssignStmt:
    		for _, x := range d.Lhs {
    			if ident, isIdent := x.(*Ident); isIdent && ident.Name == name {
    				return ident.Pos()
    			}
    		}
    	case *Scope:
    		// predeclared object - nothing to do for now
    	}
    	return token.NoPos
    }
    
    // ObjKind describes what an [Object] represents.
    type ObjKind int
    
    // The list of possible [Object] kinds.
    const (
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 28 21:32:41 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. src/cmd/internal/sys/arch.go

    	Wasm
    )
    
    // Arch represents an individual architecture.
    type Arch struct {
    	Name   string
    	Family ArchFamily
    
    	ByteOrder binary.ByteOrder
    
    	// PtrSize is the size in bytes of pointers and the
    	// predeclared "int", "uint", and "uintptr" types.
    	PtrSize int
    
    	// RegSize is the size in bytes of general purpose registers.
    	RegSize int
    
    	// MinLC is the minimum length of an instruction code.
    	MinLC int
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 13 19:51:03 UTC 2022
    - 6.2K bytes
    - Viewed (0)
  7. 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)
  8. 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)
  9. 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)
  10. src/go/doc/exports.go

    			fname := r.recordAnonymousField(parent, field.Type)
    			if fname != "" {
    				if token.IsExported(fname) {
    					keepField = true
    				} else if ityp != nil && predeclaredTypes[fname] {
    					// possibly an embedded predeclared type; keep it for now but
    					// remember this interface so that it can be fixed if name is also
    					// defined locally
    					keepField = true
    					r.remember(fname, ityp)
    				}
    			} else {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 01 18:18:07 UTC 2022
    - 8.5K bytes
    - Viewed (0)
Back to top