File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
content/programming-guides Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -274,10 +274,14 @@ possible.
274274## Out of range numeric values
275275
276276When parsing a numeric value, if the number that is is parsed from the wire
277- doesn't fit in the corresponding type, the parser should coerce the value to the
278- appropriate type. This has the same behavior as a simple cast in C++ or Java
279- (for example, if a number larger than 2^32 is read as for an int32 field, it
280- will be truncated to 32 bits).
277+ doesn't fit in the corresponding type, the parser should fail to parse.
278+
279+ This includes any negative number for ` uint32 ` , and numbers less than ` INT_MIN `
280+ or larger than ` INT_MAX ` for ` int32 ` .
281+
282+ Values with nonzero fractional portions are not allowed for integer-typed
283+ fields. Zero fractional portions are accepted. For example ` 1.0 ` is valid for an
284+ int32 field, but ` 1.5 ` is not.
281285
282286## ProtoJSON Wire Safety {#json-wire-safety}
283287
You can’t perform that action at this time.
0 commit comments