Use enum types in generated read/mutate methods for Go (#4978)

This commit is contained in:
kostya-sh
2018-10-08 22:25:37 +01:00
committed by Wouter van Oortmerssen
parent 7c3c027295
commit a4c362a1ba
6 changed files with 16 additions and 9 deletions

View File

@@ -39,7 +39,7 @@ func (rcv *TableInFirstNS) FooTable(obj *TableInNestedNS) *TableInNestedNS {
return nil
}
func (rcv *TableInFirstNS) FooEnum() int8 {
func (rcv *TableInFirstNS) FooEnum() EnumInNestedNS {
o := flatbuffers.UOffsetT(rcv._tab.Offset(6))
if o != 0 {
return rcv._tab.GetInt8(o + rcv._tab.Pos)
@@ -47,7 +47,7 @@ func (rcv *TableInFirstNS) FooEnum() int8 {
return 0
}
func (rcv *TableInFirstNS) MutateFooEnum(n int8) bool {
func (rcv *TableInFirstNS) MutateFooEnum(n EnumInNestedNS) bool {
return rcv._tab.MutateInt8Slot(6, n)
}