Int32 constructor should coerce its argument

XMLWordPrintableJSON

    • 2
    • None
    • Not Needed
    • None
    • None
    • None
    • None
    • None
    • None

      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

            Assignee:
            Grace Chong (Inactive)
            Reporter:
            Anna Henningsen
            Daria Pardue
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: