



Normally, if there is an object Obj with a property prop such that
Obj.prop==NULL, Obj.prop()==0. Also, if prop is an additive property and Obj
inherits from Class1, Class2, and Class3 (in that order), calling Obj.prop()
will result in an additional calls to Obj.Class1::prop() if the property
routine provided by Obj returns false. If Obj.Class1::prop() returns false,
Obj.Class2::prop() will be called, and Obj.Class3::prop() will be called if
THAT returns false. However, if an intermediate class in the hierarchy defines prop as NULL,
the property routines of classes higher up the hierarchy will never be
called. So, if Class2 defines prop as NULL, Obj.Class3::prop() will NOT be
called when it should. However, the return value of the Obj.prop() call in
this case is still 0. The result is that any class which defines an additive property as NULL
will break the code -- silently. None submitted. It seems deliberate that the veneer works this way,
and IMHO it shouldn't be changed, just better documented.
About Patches
Issue C62104
Additive property of NULL fails silently
Submitted by: Brendan Barnwell
Appeared in: Compiler 6.21 or before
Fixed in: -
Problem
Solution
Update (by Cedric Knight)
Last updated 2 May 2008. The librarian in charge of this page is Roger Firth. Please email any comments, suggestions or corrections to roger@firthworks.com.