Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 155 for predeclared (0.38 sec)

  1. src/internal/types/testdata/fixedbugs/issue47818.go

    // for init (and main, but we're not in package main) we should only get one error
    func init[P /* ERROR "func init must have no type parameters" */ any /* ERROR "predeclared any requires go1.18 or later" */]() {
    }
    func main[P /* ERROR "type parameter requires go1.18 or later" */ any /* ERROR "predeclared any requires go1.18 or later" */]() {
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 17 19:54:27 UTC 2023
    - 2.4K bytes
    - Viewed (0)
  2. src/internal/types/testdata/fixedbugs/issue46090.go

    // Copyright 2020 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    // The predeclared type comparable is not visible before Go 1.18.
    
    package p
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 17 19:54:25 UTC 2023
    - 307 bytes
    - Viewed (0)
  3. src/internal/types/testdata/examples/methods.go

    // Note that using what looks like a predeclared identifier, say int,
    // as type parameter in this situation is deceptive and considered bad
    // style. In m3 below, int is the name of the local receiver type parameter
    // and it shadows the predeclared identifier int which then cannot be used
    // anymore as expected.
    // This is no different from locally re-declaring a predeclared identifier
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 17 19:54:27 UTC 2023
    - 5K bytes
    - Viewed (0)
  4. 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)
  5. src/cmd/compile/internal/typecheck/iexport.go

    //         Implicit   bool
    //         Constraint typeOff
    //     }
    //
    // typeOff means a uvarint that either indicates a predeclared type,
    // or an offset into the Data section. If the uvarint is less than
    // predeclReserved, then it indicates the index into the predeclared
    // types list (see predeclared in bexport.go for order). Otherwise,
    // subtracting predeclReserved yields the offset of a type descriptor.
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jul 21 02:40:02 UTC 2023
    - 6.8K bytes
    - Viewed (0)
  6. 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)
  7. 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)
  8. src/go/internal/gcimporter/support.go

    		return types.RecvOnly
    	case 2 /* Csend */ :
    		return types.SendOnly
    	case 3 /* Cboth */ :
    		return types.SendRecv
    	default:
    		errorf("unexpected channel dir %d", d)
    		return 0
    	}
    }
    
    var predeclared = []types.Type{
    	// basic types
    	types.Typ[types.Bool],
    	types.Typ[types.Int],
    	types.Typ[types.Int8],
    	types.Typ[types.Int16],
    	types.Typ[types.Int32],
    	types.Typ[types.Int64],
    	types.Typ[types.Uint],
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 20:08:23 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  9. src/runtime/testdata/testprogcgo/raceprof.go

    //go:build unix
    // +build unix
    
    package main
    
    // Test that we can collect a lot of colliding profiling signals from
    // an external C thread. This used to fail when built with the race
    // detector, because a call of the predeclared function copy was
    // turned into a call to runtime.slicecopy, which is not marked nosplit.
    
    /*
    #include <signal.h>
    #include <stdint.h>
    #include <pthread.h>
    #include <sched.h>
    
    struct cgoTracebackArg {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 24 18:13:14 UTC 2023
    - 1.7K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/noder/posmap.go

    func (m *posMap) pos(p poser) src.XPos { return m.makeXPos(p.Pos()) }
    func (m *posMap) end(p ender) src.XPos { return m.makeXPos(p.End()) }
    
    func (m *posMap) makeXPos(pos syntax.Pos) src.XPos {
    	// Predeclared objects (e.g., the result parameter for error.Error)
    	// do not have a position.
    	if !pos.IsKnown() {
    		return src.NoXPos
    	}
    
    	posBase := m.makeSrcPosBase(pos.Base())
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jan 27 03:43:35 UTC 2023
    - 1.8K bytes
    - Viewed (0)
Back to top