From 62594004c60cb3d8fab328aab71e5e0ea7e58119 Mon Sep 17 00:00:00 2001 From: Anuraag Agrawal Date: Mon, 24 Oct 2022 15:30:14 +0900 Subject: [PATCH] Stub out reflect.Type FieldByIndex --- src/reflect/type.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/reflect/type.go b/src/reflect/type.go index e4a94079..a5e63f35 100644 --- a/src/reflect/type.go +++ b/src/reflect/type.go @@ -295,7 +295,7 @@ type Type interface { // to the index sequence. It is equivalent to calling Field // successively for each index i. // It panics if the type's Kind is not Struct. - //FieldByIndex(index []int) StructField + FieldByIndex(index []int) StructField // FieldByName returns the struct field with the given name // and a boolean indicating if the field was found. @@ -761,6 +761,10 @@ func (t rawType) FieldByName(name string) (StructField, bool) { panic("unimplemented: (reflect.Type).FieldByName()") } +func (t rawType) FieldByIndex(index []int) StructField { + panic("unimplemented: (reflect.Type).FieldByIndex()") +} + // A StructField describes a single field in a struct. type StructField struct { // Name indicates the field name.