- Sort Score
- Result 10 results
- Languages All
Results 81 - 90 of 1,740 for REFLECT (0.13 sec)
-
test/reflectmethod5.go
// license that can be found in the LICENSE file. // Issue 38515: failed to mark the method wrapper // reflect.Type.Method itself as REFLECTMETHOD. package main import "reflect" var called bool type foo struct{} func (foo) X() { called = true } var h = reflect.Type.Method func main() { v := reflect.ValueOf(foo{}) m := h(v.Type(), 0) f := m.Func.Interface().(func(foo)) f(foo{}) if !called {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sun Apr 19 03:12:32 UTC 2020 - 544 bytes - Viewed (0) -
src/cmd/fix/cftype.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Aug 07 00:25:49 UTC 2023 - 3.5K bytes - Viewed (0) -
test/reflectmethod7.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Oct 26 14:24:17 UTC 2021 - 421 bytes - Viewed (0) -
test/fixedbugs/issue15439.go
// license that can be found in the LICENSE file. package main import "reflect" func main() { a := &struct{ x int }{} b := &struct{ x int "" }{} ta := reflect.TypeOf(a) tb := reflect.TypeOf(b) // Ensure cmd/compile treats absent and empty tags as equivalent. a = b // Ensure package reflect treats absent and empty tags as equivalent. if !tb.AssignableTo(ta) { panic("fail") }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 25 21:28:45 UTC 2016 - 514 bytes - Viewed (0) -
pkg/proxy/apis/config/register_test.go
GroupName: GroupName, SchemeGroupVersion: SchemeGroupVersion, AddToScheme: AddToScheme, AllowedTags: map[reflect.Type]bool{ reflect.TypeOf(metav1.TypeMeta{}): true, reflect.TypeOf(metav1.Duration{}): true, reflect.TypeOf(logsapi.LoggingConfiguration{}): true, }, } if err := componentconfigtesting.VerifyInternalTypePackage(pkginfo); err != nil {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Jul 13 06:33:33 UTC 2023 - 1.4K bytes - Viewed (0) -
src/runtime/time_test.go
// runtime.timeTimer (exported for testing as TimeTimer) // must have time.Timer and time.Ticker as a prefix // (meaning those two must have the same layout). runtimeTimeTimer := reflect.TypeOf(runtime.TimeTimer{}) check := func(name string, typ reflect.Type) { n1 := runtimeTimeTimer.NumField() n2 := typ.NumField() if n1 != n2+1 { t.Errorf("runtime.TimeTimer has %d fields, want %d (%s has %d fields)", n1, n2+1, name, n2)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sat Mar 09 03:40:04 UTC 2024 - 3.1K bytes - Viewed (0) -
test/fixedbugs/issue19743.go
package foo // Escape analysis needs to treat the uintptr-typed reflect.*Header fields as pointers. import ( "reflect" "unsafe" ) type immutableBytes []byte // Bug was failure to leak param b. func toString(b immutableBytes) string { // ERROR "leaking param: b$" var s string if len(b) == 0 { return s } strHeader := (*reflect.StringHeader)(unsafe.Pointer(&s))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 16:34:03 UTC 2019 - 669 bytes - Viewed (0) -
test/fixedbugs/issue35073b.go
// Test that we can inline the receiver arguments for // reflect.Value.UnsafeAddr/Pointer, even in checkptr mode. package main import ( "reflect" "unsafe" ) func main() { n := 10 // ERROR "moved to heap: n" m := make(map[string]string) // ERROR "moved to heap: m" "make\(map\[string\]string\) escapes to heap" _ = unsafe.Pointer(reflect.ValueOf(&n).Elem().UnsafeAddr()) // ERROR "inlining call"
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Nov 20 15:12:49 UTC 2023 - 706 bytes - Viewed (0) -
test/ken/cplx3.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Feb 24 05:24:24 UTC 2012 - 888 bytes - Viewed (0) -
src/encoding/asn1/common.go
return false, TagInteger, false, true } switch t.Kind() { case reflect.Bool: return false, TagBoolean, false, true case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: return false, TagInteger, false, true case reflect.Struct: return false, TagSequence, true, true case reflect.Slice: if t.Elem().Kind() == reflect.Uint8 { return false, TagOctetString, false, true }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Oct 06 15:53:04 UTC 2021 - 5.5K bytes - Viewed (0)