internal/impl: add fast-path for IsInitialized
This currently returns uninformative errors from the fast path and then
consults the slow, reflection-based path only when an error is detected.
Perhaps it's worth going through the effort of producing better errors
directly on the fast path.
Change-Id: I68536e9438010dbd97dbaff4f47b78430221d94b
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/171462
Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
diff --git a/internal/testprotos/test/test.proto b/internal/testprotos/test/test.proto
index 932983c..c2b86b3 100644
--- a/internal/testprotos/test/test.proto
+++ b/internal/testprotos/test/test.proto
@@ -247,6 +247,9 @@
optional TestRequired optional_message = 1;
repeated TestRequired repeated_message = 2;
map<int32, TestRequired> map_message = 3;
+ oneof oneof_field {
+ TestRequired oneof_message = 4;
+ }
}
message TestRequiredGroupFields {