mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-18 11:33:59 +00:00
Stub out reflect.Type FieldByIndex
This commit is contained in:
committed by
Ron Evans
parent
3dbc4d5210
commit
62594004c6
+5
-1
@@ -295,7 +295,7 @@ type Type interface {
|
|||||||
// to the index sequence. It is equivalent to calling Field
|
// to the index sequence. It is equivalent to calling Field
|
||||||
// successively for each index i.
|
// successively for each index i.
|
||||||
// It panics if the type's Kind is not Struct.
|
// 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
|
// FieldByName returns the struct field with the given name
|
||||||
// and a boolean indicating if the field was found.
|
// 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()")
|
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.
|
// A StructField describes a single field in a struct.
|
||||||
type StructField struct {
|
type StructField struct {
|
||||||
// Name indicates the field name.
|
// Name indicates the field name.
|
||||||
|
|||||||
Reference in New Issue
Block a user