[View]  [Edit]  [Lock]  [References]  [Attachments]  [History]  [Home]  [Changes]  [Search]  [Help] 

test[s8] strict arithmetic



See reported issue: Number arithmetic operations.

" 5 + #34 "
[  5 + #34 ] on: Error do: [:ex| ^#ok ].
self error: 'Must be an error'


"+ must operate on numbers"
[ 5 + Array new ] on: Error do: [:ex| ^#ok ].
self error: 'Must be an error'


"* must operate on numbers"
[ 5 * Array new ] on: Error do: [:ex| ^#ok ].
self error: 'Must be an error'


"/ must operate on numbers"
[ 5 / Array new ] on: Error do: [:ex| ^#ok ].
self error: 'Must be an error'


"\\ must operate on numbers"
[ 5 \\ Array new ] on: Error do: [:ex| ^#ok ].
self error: 'Must be an error'