From 44c7d550747a61baa6a85643de439fa45c2b9633 Mon Sep 17 00:00:00 2001 From: Rahat Mahmood Date: Tue, 29 Sep 2020 12:32:32 -0700 Subject: Support embedded fields in go-marshal. PiperOrigin-RevId: 334437990 --- tools/go_marshal/test/test.go | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'tools/go_marshal/test') 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 +} -- cgit v1.2.3