Function overload clash for custom types
- Dominant language
- C++
- Stars
- 25.7k
- Forks
- 6.2k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 21
Description
## Description
When overriding an interface function with a custom type that has the same base type, the error `Function overload clash during conversion to external types for arguments` is emitted by the compiler. Emitting an error does make sense for type safety, but it could be useful to make it more apparent what the issue is.
## Environment
- Compiler version: latest
- Target EVM version (as per compiler settings): Paris
- Framework/IDE (e.g. Truffle or Remix): Foundry
- EVM execution environment / backend / blockchain client:
- Operating system: MacOS Sonoma
## Steps to Reproduce
```
type CustomType is uint256;
interface IPoc {
function isType(uint256 typeID) external view returns (bool);
}
contract Poc is IPoc {
function isType(CustomType typeID) external view returns (bool) {
return false;
}
}
```
Contributor guide
Research direction
Start by compiling the supplied Solidity snippet with the latest compiler and trace where the overload-clash diagnostic is produced. No source file or test is named; done means the diagnostic clearly identifies the interface/base-type conflict while preserving the type-safety error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, solidity
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100