Function overloading
Resolve functions with the same name from their parameter types.
Solidity 0.8.36REPL mode
Why use this example
Use this pattern to test contract composition, external calls, events, and return values inside one reproducible run. The entry isolates function overloading so its input, result, and state changes stay easy to compare.
Solidity to run
contract OverloadedLookup {
function identify(uint256 value) external pure returns (uint256) { return value; }
function identify(address value) external pure returns (address) { return value; }
}
OverloadedLookup lookup = new OverloadedLookup()
lookup.identify(uint256(42))
lookup.identify(address(0xBEEF))Official Solidity reference
Compare this focused investigation with the complete language definition in the Solidity documentation.
Function overloadingWhat to expect
The uint256 and address arguments select different identify overloads and return 42 and the address ending in BEEF.
Continue the investigation
Change a value, add another expression, or open Inspect after the run. Accepted entries remain available to the next entry, and the clean replay keeps the complete result reproducible.
Read about calls and logs Reproducible investigation