Kbase P143276: CAST function in overloaded method calls itself and causes infinite loop
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  3/19/2009 |
|
Status: Unverified
SYMPTOM(s):
CAST function in overloaded method calls itself and causes infinite loop
WARNING: -nb exceeded. Automatically increasing from <old value> to <new value>. (5407)
SYSTEM ERROR: -s exceeded. Raising STOP condition and attempting to write stack trace to file 'procore'. Consider increasing -s startup parameter. (5635)
FACT(s) (Environment):
All Supported Operating Systems
OpenEdge 10.1C
OpenEdge 10.2A
OpenEdge Category: Language (4GL/ABL)
CAUSE:
Bug# OE00182323
CAUSE:
When casting an object down from within a method that takes the higher class as parameter, and calling a same named method with the derived object as input, the original method is called recursively.
FIX:
Reverse the order of the method definitions... Place the method definition, that takes the base class as input, last. This causes the correct behavior to occur. i.e. the method which expects the base class as input is called first and the correct casting is accomplished for the overloaded method call.