- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 10 for IsNamedType (0.16 sec)
-
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/httpresponse/httpresponse.go
id, ok := fun.X.(*ast.Ident) return ok && id.Name == "http" // function in net/http package. } if analysisutil.IsNamedType(typ, "net/http", "Client") { return true // method on http.Client. } ptr, ok := aliases.Unalias(typ).(*types.Pointer) return ok && analysisutil.IsNamedType(ptr.Elem(), "net/http", "Client") // method on *http.Client. } // restOfBlock, given a traversal stack, finds the innermost containing
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 02:20:05 UTC 2024 - 5K bytes - Viewed (0) -
platforms/core-configuration/model-core/src/main/java/org/gradle/model/internal/inspect/StructNodeInitializer.java
&& !(propertySchema instanceof ScalarCollectionSchema); } private <P> boolean isNamePropertyOfANamedType(ManagedProperty<P> property) { return isNamedType() && "name".equals(property.getName()); } private boolean isNamedType() { return Named.class.isAssignableFrom(bindings.getPublicSchema().getType().getRawClass()); }
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Thu Sep 28 09:51:04 UTC 2023 - 9.7K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/unsafeptr/unsafeptr.go
if len(x.Args) != 0 { break } sel, ok := x.Fun.(*ast.SelectorExpr) if !ok { break } switch sel.Sel.Name { case "Pointer", "UnsafeAddr": if analysisutil.IsNamedType(info.Types[sel.X].Type, "reflect", "Value") { return true } } } // "(3) Conversion of a Pointer to a uintptr and back, with arithmetic." return isSafeArith(info, x) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 02:20:05 UTC 2024 - 4.7K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/internal/analysisutil/util.go
if imp.Path() == path { return true } } return false } // IsNamedType reports whether t is the named type with the given package path // and one of the given names. // This function avoids allocating the concatenation of "pkg.Name", // which is important for the performance of syntax matching. func IsNamedType(t types.Type, pkgPath string, names ...string) bool { n, ok := aliases.Unalias(t).(*types.Named)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 03 02:38:00 UTC 2024 - 3.9K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/timeformat/timeformat.go
if f.Name() != "Format" || f.Pkg() == nil || f.Pkg().Path() != "time" { return false } // Verify that the receiver is time.Time. recv := f.Type().(*types.Signature).Recv() return recv != nil && analysisutil.IsNamedType(recv.Type(), "time", "Time") } func isTimeDotParse(f *types.Func) bool { return analysisutil.IsFunctionNamed(f, "time", "Parse") }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 02:20:05 UTC 2024 - 3.3K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/slog/slog.go
} else { pass.ReportRangef(call, "call to %s has a missing or misplaced value", shortName(fn)) } } }) return nil, nil } func isAttr(t types.Type) bool { return analysisutil.IsNamedType(t, "log/slog", "Attr") } // shortName returns a name for the function that is shorter than FullName. // Examples: // // "slog.Info" (instead of "log/slog.Info")
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 02:20:05 UTC 2024 - 7.2K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/copylock/copylock.go
} // In go1.10, sync.noCopy did not implement Locker. // (The Unlock method was added only in CL 121876.) // TODO(adonovan): remove workaround when we drop go1.10. if analysisutil.IsNamedType(typ, "sync", "noCopy") { return []string{typ.String()} } nfields := styp.NumFields() for i := 0; i < nfields; i++ { ftyp := styp.Field(i).Type() subpath := lockPath(tpkg, ftyp, seen)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 04 16:19:04 UTC 2024 - 9.9K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/loopclosure/loopclosure.go
if recv == nil { return false } // Check that the receiver is a <pkgPath>.<typeName> or // *<pkgPath>.<typeName>. _, named := typesinternal.ReceiverNamed(recv) return analysisutil.IsNamedType(named, pkgPath, typeName)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 02:20:05 UTC 2024 - 10.3K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/tests/tests.go
// No Unalias here: I doubt "go test" recognizes // "type A = *testing.T; func Test(A) {}" as a test. ptr, ok := typ.(*types.Pointer) if !ok { return false } return analysisutil.IsNamedType(ptr.Elem(), "testing", testingType) } // Validate that fuzz target function's arguments are of accepted types. func isAcceptedFuzzType(paramType types.Type) bool { for _, typ := range acceptedFuzzTypes {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 03 02:38:00 UTC 2024 - 14.4K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/printf/printf.go
fn, ok := obj.(*types.Func) if !ok { return false } sig := fn.Type().(*types.Signature) return sig.Params().Len() == 2 && sig.Results().Len() == 0 && analysisutil.IsNamedType(sig.Params().At(0).Type(), "fmt", "State") && types.Identical(sig.Params().At(1).Type(), types.Typ[types.Rune]) } // formatState holds the parsed representation of a printf directive such as "%3.*[4]d".
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 02:20:05 UTC 2024 - 32.5K bytes - Viewed (0)