Can FPC deal with double-dispatch ?
Say you have an object defined as :
Type
TMyObject = Class
Public
Procedure DoSomething(Const aObject : TObject); Virtual;
End;
TMyParameterObject = Class
Public
End;
TMyOtherParameterObject = Class
Public
End;Can you do something like :
Type
TMyOtherObject = Class(TMyObject)
Public
Procedure DoSomething(Const aObject : TMyParamaterObject); Override; Overload;
Procedure DoSomething(Const aObject : TMyOtherParameterObject);
Override; Overload;
End;And have the run-time choose the correct implementation to call by looking at the object type ?
