Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 70 for predeclared (0.2 sec)

  1. src/go/doc/reader.go

    func (r *reader) cleanupTypes() {
    	for _, t := range r.types {
    		visible := r.isVisible(t.name)
    		predeclared := predeclaredTypes[t.name]
    
    		if t.decl == nil && (predeclared || visible && (t.isEmbedded || r.hasDotImp)) {
    			// t.name is a predeclared type (and was not redeclared in this package),
    			// or it was embedded somewhere but its declaration is missing (because
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 27.5K bytes
    - Viewed (0)
  2. src/go/types/stdlib_test.go

    	// All Objects have a package, except predeclared ones.
    	errorError := Universe.Lookup("error").Type().Underlying().(*Interface).ExplicitMethod(0) // (error).Error
    	for id, obj := range info.Uses {
    		predeclared := obj == Universe.Lookup(obj.Name()) || obj == errorError
    		if predeclared == (obj.Pkg() != nil) {
    			posn := fset.Position(id.Pos())
    			if predeclared {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Dec 19 04:39:56 UTC 2023
    - 13.7K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/types2/stdlib_test.go

    	// All Objects have a package, except predeclared ones.
    	errorError := Universe.Lookup("error").Type().Underlying().(*Interface).ExplicitMethod(0) // (error).Error
    	for id, obj := range info.Uses {
    		predeclared := obj == Universe.Lookup(obj.Name()) || obj == errorError
    		if predeclared == (obj.Pkg() != nil) {
    			posn := id.Pos()
    			if predeclared {
    				return nil, fmt.Errorf("%s: predeclared object with package: %s", posn, obj)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:18:33 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  4. 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)
  5. 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)
  6. 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)
  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/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)
  9. hack/tools/go.mod

    	github.com/nakabonne/nestif v0.3.1 // indirect
    	github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect
    	github.com/nishanths/exhaustive v0.12.0 // indirect
    	github.com/nishanths/predeclared v0.2.2 // indirect
    	github.com/nunnatsa/ginkgolinter v0.15.2 // indirect
    	github.com/olekukonko/tablewriter v0.0.5 // indirect
    	github.com/pelletier/go-toml v1.9.5 // indirect
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Mar 07 08:12:16 UTC 2024
    - 10.1K bytes
    - Viewed (0)
  10. src/go/doc/example.go

    // An Example is "playable" (the Play field is non-nil) in either of these
    // circumstances:
    //   - The example function is self-contained: the function references only
    //     identifiers from other packages (or predeclared identifiers, such as
    //     "int") and the test file does not include a dot import.
    //   - The entire test file is the example: the file contains exactly one
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 21.4K bytes
    - Viewed (0)
Back to top