reflect/prototype: use proto2 syntax for standalone extension fields

Without resolving the question of whether an extension field is always proto2
or sometimes proto3, just make it impossible to construct a standalone extension
field of the proto3 syntax.

By dropping the syntax field from the constructor, we can just assume that the
syntax is always proto2. There is no benefit for creating a proto3 standalone
extension, so there is no loss of functionality.

In the unlikely future where there needs to be distinction, we can add the field
back into the descriptor. The zero value of protoreflect.Syntax is invalid,
so we can determine if the user did not set that field.

Change-Id: Ie93fa55de96f29553fb04ff6649bbea79a144407
Reviewed-on: https://go-review.googlesource.com/c/144279
Reviewed-by: Damien Neil <dneil@google.com>
diff --git a/reflect/prototype/standalone.go b/reflect/prototype/standalone.go
index bd420ed..fb973df 100644
--- a/reflect/prototype/standalone.go
+++ b/reflect/prototype/standalone.go
@@ -104,7 +104,6 @@
 // StandaloneExtension is a constructor for a protoreflect.ExtensionDescriptor
 // that does not have a parent.
 type StandaloneExtension struct {
-	Syntax       protoreflect.Syntax
 	FullName     protoreflect.FullName
 	Number       protoreflect.FieldNumber
 	Cardinality  protoreflect.Cardinality
diff --git a/reflect/prototype/standalone_type.go b/reflect/prototype/standalone_type.go
index 90609aa..bb014b6 100644
--- a/reflect/prototype/standalone_type.go
+++ b/reflect/prototype/standalone_type.go
@@ -52,7 +52,7 @@
 
 func (t standaloneExtension) Parent() (pref.Descriptor, bool)       { return nil, false }
 func (t standaloneExtension) Index() int                            { return 0 }
-func (t standaloneExtension) Syntax() pref.Syntax                   { return t.x.Syntax }
+func (t standaloneExtension) Syntax() pref.Syntax                   { return pref.Proto2 }
 func (t standaloneExtension) Name() pref.Name                       { return t.x.FullName.Name() }
 func (t standaloneExtension) FullName() pref.FullName               { return t.x.FullName }
 func (t standaloneExtension) IsPlaceholder() bool                   { return false }