Error when overriding method min:

Project:GNU Smalltalk
Component:Base classes
Category:bug
Priority:normal
Assigned:Unassigned
Status:invalid
Description

I'm trying to override method min:. However, there is an overflow error when I added a debug print.


!Number methodsFor: ''!
min: aNumber
 Transcript show: 'in min'.
  ^aNumber > self ifTrue: [self] ifFalse: [aNumber].

!!

Updates

#1 submitted by Paolo Bonzini on Thu, 08/02/2012 - 13:25
Status:active» invalid

The #min: method is invoked while printing on the Transcript, so you are causing infinite recursion.

User login