-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: BSON
The Int32 constructor should coerce its argument immediately to int32, so that e.g. Int32(-(2**40)).valueOf() === 0 instead of Int32(-(2**40)).valueOf() === -(2**40). This makes it consistent with e.g. Long, and makes Int32 match what is being serialized when encoding as BSON.
AC
- Make sure the behavior matches what is described above
- Test numbers outside the range of Int32, positive and negative
- related to
-
MONGOSH-1006 Int32 size validation missing
- Closed
-
NODE-3725 Constrain new ObjectId constructor and drop support for non-relevant cases
- Closed