You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 4245 Reporter:@mmottl Assigned to:@xavierleroy Status: closed (set by @xavierleroy on 2011-05-29T10:14:02Z) Resolution: fixed Priority: normal Severity: minor Version: 3.09.3 Fixed in version: 3.12.0+dev Category: ~DO NOT USE (was: OCaml general) Duplicate of:#4210 Related to:#3302 Monitored by: yminsky @mmottl
Bug description
This should not be accepted:
Int32.of_string "2147483648";;
: int32 = -2147483648l
This is correctly rejected (first number + 1):
Int32.of_string "2147483649";;
Exception: Failure "int_of_string".
And this is correctly accepted (first number - 1):
Int32.of_string "2147483647";;
: int32 = 2147483647l
The corner case is obviously not handled correctly.
The same problem happens with the other integer conversions: Int64.of_string, Nativeint.of_string, and even int_of_string.
The text was updated successfully, but these errors were encountered:
Original bug ID: 4245
Reporter: @mmottl
Assigned to: @xavierleroy
Status: closed (set by @xavierleroy on 2011-05-29T10:14:02Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 3.09.3
Fixed in version: 3.12.0+dev
Category: ~DO NOT USE (was: OCaml general)
Duplicate of: #4210
Related to: #3302
Monitored by: yminsky @mmottl
Bug description
This should not be accepted:
Int32.of_string "2147483648";;
This is correctly rejected (first number + 1):
Int32.of_string "2147483649";;
Exception: Failure "int_of_string".
And this is correctly accepted (first number - 1):
Int32.of_string "2147483647";;
The corner case is obviously not handled correctly.
The same problem happens with the other integer conversions: Int64.of_string, Nativeint.of_string, and even int_of_string.
The text was updated successfully, but these errors were encountered: