diff options
author | Rahat Mahmood <rahat@google.com> | 2020-09-29 12:32:32 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-09-29 12:34:30 -0700 |
commit | 44c7d550747a61baa6a85643de439fa45c2b9633 (patch) | |
tree | e64c757ab24cc12c3180f10651c460f0a026a513 /tools/go_marshal/test | |
parent | 7d64bc1fdf538869de5964475110a69580b481ad (diff) |
Support embedded fields in go-marshal.
PiperOrigin-RevId: 334437990
Diffstat (limited to 'tools/go_marshal/test')
-rw-r--r-- | tools/go_marshal/test/test.go | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tools/go_marshal/test/test.go b/tools/go_marshal/test/test.go index f75ca1b7f..d9e9f341b 100644 --- a/tools/go_marshal/test/test.go +++ b/tools/go_marshal/test/test.go @@ -174,3 +174,27 @@ type Type9 struct { x int64 y [sizeA]int32 } + +// Type10Embed is a test data type which is be embedded into another type. +// +// +marshal +type Type10Embed struct { + x int64 +} + +// Type10 is a test data type which contains an embedded struct. +// +// +marshal +type Type10 struct { + Type10Embed + y int64 +} + +// Type11 is a test data type which contains an embedded struct from an external +// package. +// +// +marshal +type Type11 struct { + ex.External + y int64 +} |