The following example should work due to overloading:
Int add(Int x, Int y):
// ...
Int add(Int x, String y):
// ...
The following example should NOT work, since the signatures are equal:
Int add(Int x, Int y):
// ...
Int add(Int x, Int y):
// ...
But it does.
(Redefinition of variables is prevented correctly)
The following example should work due to overloading:
The following example should NOT work, since the signatures are equal:
But it does.
(Redefinition of variables is prevented correctly)