|
|
|
[
Permlink
| « Hide
]
Joshua W. Biagio - 31/Aug/05 08:17 PM
Make that "The first 'i += 1' call should trigger an overflow error.
This appears to be related to the "SetLastValue" and "GetValue" calls in AbstractInterpreter.
--------------------------------------- Running boo 0.6.0.1858. The following builtin functions are available: Enter boo code in the prompt below. private static def Main(argv as (System.String)) as System.Void: private def constructor(): public static ParentInterpreter as Boo.Lang.Interpreter.AbstractInterpreter 32767 private static def Main(argv as (System.String)) as System.Void: private def constructor(): public static ParentInterpreter as Boo.Lang.Interpreter.AbstractInterpreter 32812 private static def Main(argv as (System.String)) as System.Void: private def constructor(): public static ParentInterpreter as Boo.Lang.Interpreter.AbstractInterpreter 32812 No type or range checking appears to be taking place. Also, the intrinsic value for integral types appears to be Int32... Compare the behavior of int to short (above): >>> j as int private static def Main(argv as (System.String)) as System.Void: private def constructor(): public static ParentInterpreter as Boo.Lang.Interpreter.AbstractInterpreter >>> j = int.MaxValue private static def Main(argv as (System.String)) as System.Void: private def constructor(): public static ParentInterpreter as Boo.Lang.Interpreter.AbstractInterpreter 2147483647 private static def Main(argv as (System.String)) as System.Void: private def constructor(): public static ParentInterpreter as Boo.Lang.Interpreter.AbstractInterpreter System.OverflowException: Arithmetic operation resulted in an overflow. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||