Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for concreteMethod (0.32 sec)

  1. src/cmd/vendor/golang.org/x/tools/go/types/objectpath/objectpath.go

    		// A func, if not package-level, must be a method.
    		if recv := obj.Type().(*types.Signature).Recv(); recv == nil {
    			return "", fmt.Errorf("func is not a method: %v", obj)
    		}
    
    		if path, ok := enc.concreteMethod(obj); ok {
    			// Fast path for concrete methods that avoids looping over scope.
    			return path, nil
    		}
    
    	default:
    		panic(obj)
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 23.1K bytes
    - Viewed (0)
  2. src/go/types/api_test.go

    func TestInstantiatedObjects(t *testing.T) {
    	const src = `
    package p
    
    type T[P any] struct {
    	field P
    }
    
    func (recv *T[Q]) concreteMethod(mParam Q) (mResult Q) { return }
    
    type FT[P any] func(ftParam P) (ftResult P)
    
    func F[P any](fParam P) (fResult P){ return }
    
    type I[P any] interface {
    	interfaceMethod(P)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 94.2K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/types2/api_test.go

    func TestInstantiatedObjects(t *testing.T) {
    	const src = `
    package p
    
    type T[P any] struct {
    	field P
    }
    
    func (recv *T[Q]) concreteMethod(mParam Q) (mResult Q) { return }
    
    type FT[P any] func(ftParam P) (ftResult P)
    
    func F[P any](fParam P) (fResult P){ return }
    
    type I[P any] interface {
    	interfaceMethod(P)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 20:08:23 UTC 2024
    - 93.3K bytes
    - Viewed (0)
Back to top