Content deleted Content added
m linking |
No edit summary Tags: Reverted Mobile edit Mobile web edit |
||
Line 5:
{{Polymorphism}}
In some [[programming language]]s,
For example, {{code|doTask()}} and{{code|doTask(object o)}} are overloaded functions. To call the latter, an [[object (computer science)|object]] must be passed as a [[parameter (computer science)|parameter]], whereas the former does not require a parameter, and is called with an empty parameter field. A common error would be to assign a default value to the object in the second function, which would result in an ''ambiguous call'' error, as the compiler wouldn't know which of the two methods to use.
|