Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for hasPtrRecv (0.77 sec)

  1. src/go/types/methodset.go

    		// TODO(gri) A found method may not be added because it's not in the method set
    		// (!indirect && f.hasPtrRecv()). A 2nd method on the same level may be in the method
    		// set and may not collide with the first one, thus leading to a false positive.
    		// Is that possible? Investigate.
    		if _, found := s[key]; !found && (indirect || !f.hasPtrRecv()) {
    			s[key] = &Selection{MethodVal, nil, f, index, indirect}
    			return s
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 12:02:03 UTC 2023
    - 7.1K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/types2/object.go

    // like method Error of the error built-in interface type.
    func (obj *Func) Pkg() *Package { return obj.object.Pkg() }
    
    // hasPtrRecv reports whether the receiver is of the form *T for the given method obj.
    func (obj *Func) hasPtrRecv() bool {
    	// If a method's receiver type is set, use that as the source of truth for the receiver.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 20:08:23 UTC 2024
    - 20.1K bytes
    - Viewed (0)
  3. src/go/types/object.go

    // like method Error of the error built-in interface type.
    func (obj *Func) Pkg() *Package { return obj.object.Pkg() }
    
    // hasPtrRecv reports whether the receiver is of the form *T for the given method obj.
    func (obj *Func) hasPtrRecv() bool {
    	// If a method's receiver type is set, use that as the source of truth for the receiver.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 20:08:23 UTC 2024
    - 20.1K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/types2/lookup.go

    			//        list of m. If x is addressable and &x's method set contains m, x.m()
    			//        is shorthand for (&x).m()".
    			if f, _ := obj.(*Func); f != nil {
    				// determine if method has a pointer receiver
    				if f.hasPtrRecv() && !indirect && !addressable {
    					return nil, nil, true // pointer/addressable receiver required
    				}
    			}
    			return
    		}
    
    		current = consolidateMultiples(next)
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 22 19:32:17 UTC 2024
    - 19.8K bytes
    - Viewed (0)
  5. src/go/types/lookup.go

    			//        list of m. If x is addressable and &x's method set contains m, x.m()
    			//        is shorthand for (&x).m()".
    			if f, _ := obj.(*Func); f != nil {
    				// determine if method has a pointer receiver
    				if f.hasPtrRecv() && !indirect && !addressable {
    					return nil, nil, true // pointer/addressable receiver required
    				}
    			}
    			return
    		}
    
    		current = consolidateMultiples(next)
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 03 18:48:38 UTC 2024
    - 19.9K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/types2/named.go

    	if sig == origSig {
    		// No substitution occurred, but we still need to create a new signature to
    		// hold the instantiated receiver.
    		copy := *origSig
    		sig = &copy
    	}
    
    	var rtyp Type
    	if origm.hasPtrRecv() {
    		rtyp = NewPointer(t)
    	} else {
    		rtyp = t
    	}
    
    	sig.recv = substVar(origSig.recv, rtyp)
    	return substFunc(origm, sig)
    }
    
    // SetUnderlying sets the underlying type and marks t as complete.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 20:03:31 UTC 2024
    - 23.9K bytes
    - Viewed (0)
  7. src/go/types/named.go

    	if sig == origSig {
    		// No substitution occurred, but we still need to create a new signature to
    		// hold the instantiated receiver.
    		copy := *origSig
    		sig = &copy
    	}
    
    	var rtyp Type
    	if origm.hasPtrRecv() {
    		rtyp = NewPointer(t)
    	} else {
    		rtyp = t
    	}
    
    	sig.recv = substVar(origSig.recv, rtyp)
    	return substFunc(origm, sig)
    }
    
    // SetUnderlying sets the underlying type and marks t as complete.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 20:03:31 UTC 2024
    - 24K bytes
    - Viewed (0)
Back to top