Question: Most languages that allow overloading of function definitions have this restriction: they do not permit two definitions for the same function to differ only in
Most languages that allow overloading of function definitions have this restriction: they do not permit two definitions for the same function to differ only in the type of value returned. Ada must sometimes use the context of a function call to determine which overloaded definition to use. Consider the statement:= f(f(a,b), f(c, d)) in an Ada-like language. Give an example of a set of types for the overloaded function f that makes this statement ambiguous, even when the types of a, b, c, d, and e are known.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
