[bug] Error when overriding method min:

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[bug] Error when overriding method min:

Roman
Issue status update for
http://smalltalk.gnu.org/node/649
Post a follow up:
http://smalltalk.gnu.org/project/comments/add/649

 Project:      GNU Smalltalk
 Version:      <none>
 Component:    Base classes
 Category:     bug reports
 Priority:     normal
 Assigned to:  Unassigned
 Reported by:  Roman
 Updated by:   Roman
 Status:       active

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].
!!



_______________________________________________
help-smalltalk mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: [bug] Error when overriding method min:

Paolo Bonzini-3
Issue status update for
http://smalltalk.gnu.org/project/issue/649
Post a follow up:
http://smalltalk.gnu.org/project/comments/add/649

 Project:      GNU Smalltalk
 Version:      <none>
 Component:    Base classes
 Category:     bug reports
 Priority:     normal
 Assigned to:  Unassigned
 Reported by:  Roman
 Updated by:   bonzinip
-Status:       active
+Status:       invalid

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



_______________________________________________
help-smalltalk mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-smalltalk