proto: fix compilation failure in tests

Change-Id: I61a84dffcf4ccc9f81dc8b9f932c315713e81142
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/418674
Reviewed-by: Lasse Folger <lassefolger@google.com>
This commit is contained in:
Damien Neil 2022-07-20 10:18:12 -07:00 committed by Lasse Folger
parent fc44d00d5a
commit 5f429f7042

View File

@ -632,11 +632,11 @@ func makeNested(depth int) *testpb.TestAllTypes {
if depth <= 0 { if depth <= 0 {
return nil return nil
} }
return testpb.TestAllTypes_builder{ return &testpb.TestAllTypes{
OptionalNestedMessage: testpb.TestAllTypes_NestedMessage_builder{ OptionalNestedMessage: &testpb.TestAllTypes_NestedMessage{
Corecursive: makeNested(depth - 1), Corecursive: makeNested(depth - 1),
}.Build(), },
}.Build() }
} }
func BenchmarkEqualWithDeeplyNestedEqual(b *testing.B) { func BenchmarkEqualWithDeeplyNestedEqual(b *testing.B) {