- Sort Score
- Result 10 results
- Languages All
Results 51 - 60 of 1,811 for reflect1 (0.53 sec)
-
test/fixedbugs/issue57184.go
package main import ( "log" "reflect" "sort" ) func main() { const length = 257 x := make([]int64, length) for i := 0; i < length; i++ { x[i] = int64(i) * 27644437 % int64(length) } isLessStatic := func(i, j int) bool { return x[i] < x[j] } isLessReflect := reflect.MakeFunc(reflect.TypeOf(isLessStatic), func(args []reflect.Value) []reflect.Value { i := args[0].Int()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Dec 09 21:38:33 UTC 2022 - 851 bytes - Viewed (0) -
test/fixedbugs/issue26335.go
// reflect.Value.Call. package main import ( "reflect" ) type Empty struct { f1, f2 *byte empty struct{} } func F(e Empty, s []string) { if len(s) != 1 || s[0] != "hi" { panic("bad slice") } } func main() { reflect.ValueOf(F).Call([]reflect.Value{ reflect.ValueOf(Empty{}), reflect.ValueOf([]string{"hi"}), })
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jul 11 18:14:35 UTC 2018 - 563 bytes - Viewed (0) -
src/cmd/cgo/internal/testsanitizers/testdata/msan5.go
Go2(a); if (a[0] != 42) { abort(); } } */ import "C" import ( "reflect" "unsafe" ) //export Go1 func Go1(p *C.int) { reflect.ValueOf(p).Elem().Set(reflect.ValueOf(C.int(42))) } //export Go2 func Go2(p *C.char) { a := (*[2]byte)(unsafe.Pointer(p)) reflect.Copy(reflect.ValueOf(a[:1]), reflect.ValueOf(a[1:])) } func main() { C.C1() C.C2()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 11:59:56 UTC 2023 - 904 bytes - Viewed (0) -
test/fixedbugs/issue49110.go
// Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package main import "reflect" func main() { _ = reflect.StructOf([]reflect.StructField{ {Name: "_", PkgPath: "main", Type: reflect.TypeOf(int(0))}, {Name: "_", PkgPath: "main", Type: reflect.TypeOf(int(0))}, })
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Oct 27 21:35:48 UTC 2021 - 389 bytes - Viewed (0) -
callbacks/callmethod.go
package callbacks import ( "reflect" "gorm.io/gorm" ) func callMethod(db *gorm.DB, fc func(value interface{}, tx *gorm.DB) bool) { tx := db.Session(&gorm.Session{NewDB: true}) if called := fc(db.Statement.ReflectValue.Interface(), tx); !called { switch db.Statement.ReflectValue.Kind() { case reflect.Slice, reflect.Array: db.Statement.CurDestIndex = 0 for i := 0; i < db.Statement.ReflectValue.Len(); i++ {
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Sat Feb 18 01:20:29 UTC 2023 - 846 bytes - Viewed (0) -
test/fixedbugs/issue16331.go
package main import "reflect" type T struct{} func (T) M() { } func F(args []reflect.Value) (results []reflect.Value) { return nil } func main() { done := make(chan bool) go func() { // Test reflect.makeFuncStub. t := reflect.TypeOf((func())(nil)) f := reflect.MakeFunc(t, F).Interface().(func()) defer f() growstack(10000)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Oct 17 18:57:01 UTC 2016 - 839 bytes - Viewed (0) -
platforms/core-configuration/kotlin-dsl/src/test/kotlin/org/gradle/kotlin/dsl/provider/ScriptApiTest.kt
import org.junit.Test import kotlin.reflect.KCallable import kotlin.reflect.KClass import kotlin.reflect.KFunction import kotlin.reflect.KMutableProperty import kotlin.reflect.KParameter import kotlin.reflect.KProperty import kotlin.reflect.KType import kotlin.reflect.KTypeProjection import kotlin.reflect.KVariance import kotlin.reflect.KVisibility import kotlin.reflect.full.createType
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Wed Aug 02 08:06:49 UTC 2023 - 9K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/authorization/cel/compile_test.go
return nil } func nativeTypeToCELType(t *testing.T, nativeType reflect.Type, field func(name string, declType *apiservercel.DeclType, required bool) *apiservercel.DeclField, fields func(fields ...*apiservercel.DeclField) map[string]*apiservercel.DeclField) *apiservercel.DeclType { switch nativeType { case reflect.TypeOf(""): return apiservercel.StringType case reflect.TypeOf([]string{}):
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri May 10 22:07:40 UTC 2024 - 5.9K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/util/strategicpatch/meta.go
t := elemPatchMetaFromStruct.T var elemType reflect.Type switch t.Kind() { // If t is an array or a slice, get the element type. // If element is still an array or a slice, return an error. // Otherwise, return element type. case reflect.Array, reflect.Slice: elemType = t.Elem() if elemType.Kind() == reflect.Array || elemType.Kind() == reflect.Slice {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Oct 31 16:45:45 UTC 2023 - 7.7K bytes - Viewed (0) -
platforms/core-configuration/declarative-dsl-core/src/main/kotlin/org/gradle/internal/declarativedsl/schemaBuilder/PropertyExtractor.kt
import java.util.Locale import kotlin.reflect.KClass import kotlin.reflect.KFunction import kotlin.reflect.KMutableProperty import kotlin.reflect.KProperty import kotlin.reflect.KType import kotlin.reflect.KVisibility import kotlin.reflect.full.instanceParameter import kotlin.reflect.full.memberFunctions import kotlin.reflect.full.memberProperties import kotlin.reflect.full.primaryConstructor
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Tue May 14 10:08:01 UTC 2024 - 6.7K bytes - Viewed (0)