diff --git a/src/primitives.cr b/src/primitives.cr index 246ff09714c4..4ecb3b8f0c5c 100644 --- a/src/primitives.cr +++ b/src/primitives.cr @@ -288,7 +288,11 @@ end end # Returns `self` converted to `{{type}}`. - # In case of overflow a wrapping is performed. + # In case of overflow + # {% if ints.includes?(num) %} a wrapping is performed. + # {% elsif type < Int %} the result is undefined. + # {% else %} infinity is returned. + # {% end %} @[Primitive(:unchecked_convert)] def {{name.id}}! : {{type}} end