Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for HasNil (0.88 sec)

  1. src/go/types/expr.go

    		if allString(x.typ) != allString(y.typ) {
    			return false
    		}
    		// Untyped nil can only convert to a type that has a nil.
    		if x.isNil() {
    			return hasNil(y.typ)
    		}
    		if y.isNil() {
    			return hasNil(x.typ)
    		}
    		// An untyped operand cannot convert to a pointer.
    		// TODO(gri) generalize to type parameters
    		if isPointer(x.typ) || isPointer(y.typ) {
    			return false
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 02:09:54 UTC 2024
    - 49.7K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/types2/expr.go

    		if allString(x.typ) != allString(y.typ) {
    			return false
    		}
    		// Untyped nil can only convert to a type that has a nil.
    		if x.isNil() {
    			return hasNil(y.typ)
    		}
    		if y.isNil() {
    			return hasNil(x.typ)
    		}
    		// An untyped operand cannot convert to a pointer.
    		// TODO(gri) generalize to type parameters
    		if isPointer(x.typ) || isPointer(y.typ) {
    			return false
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 02:09:54 UTC 2024
    - 51.7K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/types/type.go

    func (t *Type) IsPtrShaped() bool {
    	return t.kind == TPTR || t.kind == TUNSAFEPTR ||
    		t.kind == TMAP || t.kind == TCHAN || t.kind == TFUNC
    }
    
    // HasNil reports whether the set of values determined by t includes nil.
    func (t *Type) HasNil() bool {
    	switch t.kind {
    	case TCHAN, TFUNC, TINTER, TMAP, TNIL, TPTR, TSLICE, TUNSAFEPTR:
    		return true
    	}
    	return false
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 04 14:29:45 UTC 2024
    - 49.5K bytes
    - Viewed (0)
Back to top