- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 57 for IsPtr (0.07 sec)
-
src/cmd/vendor/golang.org/x/tools/internal/typesinternal/recv.go
// type of recv, which may be of the form N or *N, or aliases thereof. // It also reports whether a Pointer was present. func ReceiverNamed(recv *types.Var) (isPtr bool, named *types.Named) { t := recv.Type() if ptr, ok := aliases.Unalias(t).(*types.Pointer); ok { isPtr = true t = ptr.Elem() } named, _ = aliases.Unalias(t).(*types.Named) return } // Unpointer returns T given *T or an alias thereof.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 02:20:05 UTC 2024 - 1.3K bytes - Viewed (0) -
callbacks/associations.go
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Tue Apr 11 03:06:13 UTC 2023 - 14.3K bytes - Viewed (0) -
src/cmd/compile/internal/typecheck/subr.go
} // Conversions from regular to not-in-heap are not allowed // (unless it's unsafe.Pointer). These are runtime-specific // rules. // (a) Disallow (*T) to (*U) where T is not-in-heap but U isn't. if src.IsPtr() && dst.IsPtr() && dst.Elem().NotInHeap() && !src.Elem().NotInHeap() { why := fmt.Sprintf(":\n\t%v is incomplete (or unallocatable), but %v is not", dst.Elem(), src.Elem()) return ir.OXXX, why }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 05 19:45:58 UTC 2023 - 20.2K bytes - Viewed (0) -
src/go/types/methodset.go
} // method set up to the current depth, allocated lazily var base methodSet typ, isPtr := deref(T) // *typ where typ is an interface has no methods. if isPtr && IsInterface(typ) { return &emptyMethodSet } // Start with typ as single entry at shallowest depth. current := []embeddedType{{typ, nil, isPtr, false}} // seen tracks named types that we have seen already, allocated lazily.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 12:02:03 UTC 2023 - 7.1K bytes - Viewed (0) -
src/cmd/compile/internal/typecheck/typecheck.go
n.X = typecheck(star, ctxType|ctxExpr) } else if tt.IsPtr() && tt.Elem().IsPtr() && types.Identical(derefall(tt), derefall(rcvr)) { base.Errorf("calling method %v with receiver %L requires explicit dereference", n.Sel, n.X) for tt.IsPtr() { // Stop one level early for method with pointer receiver. if rcvr.IsPtr() && !tt.Elem().IsPtr() { break } star := ir.NewStarExpr(base.Pos, n.X)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Mar 20 19:08:34 UTC 2024 - 30.5K bytes - Viewed (0) -
src/cmd/compile/internal/types2/lookup.go
// methods of the pointer base type when T is a (*Named) pointer type. typ, isPtr := deref(T) // *typ where typ is an interface (incl. a type parameter) has no methods. if isPtr { if _, ok := under(typ).(*Interface); ok { return } } // Start with typ as single entry at shallowest depth. current := []embeddedType{{typ, nil, isPtr, false}}
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Feb 22 19:32:17 UTC 2024 - 19.8K bytes - Viewed (0) -
src/go/types/lookup.go
// methods of the pointer base type when T is a (*Named) pointer type. typ, isPtr := deref(T) // *typ where typ is an interface (incl. a type parameter) has no methods. if isPtr { if _, ok := under(typ).(*Interface); ok { return } } // Start with typ as single entry at shallowest depth. current := []embeddedType{{typ, nil, isPtr, false}}
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Apr 03 18:48:38 UTC 2024 - 19.9K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/httpresponse/httpresponse.go
return false // the call is not of the form x.f() } res := sig.Results() if res.Len() != 2 { return false // the function called does not return two values. } isPtr, named := typesinternal.ReceiverNamed(res.At(0)) if !isPtr || named == nil || !analysisutil.IsNamedType(named, "net/http", "Response") { return false // the first return type is not *http.Response. }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 02:20:05 UTC 2024 - 5K bytes - Viewed (0) -
src/cmd/compile/internal/typecheck/iimport.go
// TODO(mdempsky): Store this information directly in the Type's Name. var typeSymIdx = make(map[*types.Type][2]int64) func BaseTypeIndex(t *types.Type) int64 { tbase := t if t.IsPtr() && t.Sym() == nil && t.Elem().Sym() != nil { tbase = t.Elem() } i, ok := typeSymIdx[tbase] if !ok { return -1 } if t != tbase { return i[1] } return i[0]
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jan 26 21:52:50 UTC 2023 - 1.3K bytes - Viewed (0) -
scan.go
} reflectValueType := reflectValue.Type() switch reflectValueType.Kind() { case reflect.Array, reflect.Slice: reflectValueType = reflectValueType.Elem() } isPtr := reflectValueType.Kind() == reflect.Ptr if isPtr { reflectValueType = reflectValueType.Elem() } if sch != nil { if reflectValueType != sch.ModelType && reflectValueType.Kind() == reflect.Struct {
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Wed Jun 12 10:57:36 UTC 2024 - 10K bytes - Viewed (0)