diff --git a/internal/impl/lazy_test.go b/internal/impl/lazy_test.go index e9d6e8816..fe3035b09 100644 --- a/internal/impl/lazy_test.go +++ b/internal/impl/lazy_test.go @@ -542,7 +542,8 @@ func TestMarshalMessageSetLazyRace(t *testing.T) { go func() { defer wg.Done() if err := func() error { - if !proto.HasExtension(h.GetData(), lazytestpb.E_Rabbit_MessageSetExtension) { + mm := proto.GetExtension(h.GetData(), lazytestpb.E_Rabbit_MessageSetExtension).(*lazytestpb.Rabbit) + if mm == nil { return errors.New("proto: missing extension") } return nil