You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
//...
struct Z {
bool z;
}
struct Z2 {
bool z;
}
function _testClash(S storage t) internal {}
function _testClash(Z storage t) internal {}
function _testClash(Z2 storage t) internal {}
function _testClash(S memory t) internal {}
function _testClash(Z memory t) internal {}
function _testClash(Z2 memory t) internal {}
}
causes
TypeError: Function overload clash during conversion to external types for arguments.
--> contracts-exposed/Test.sol:54:5:
|
54 | function $_testClash(Foo.Z2 calldata t) external {
| ^ (Relevant source part starts here and spans across multiple lines).
This is because the internal function use different types, but Z and Z2 have the same underlying type, cause the external version to have function selector clash.
Possible fix:
When constructing the clashingFunctions record, consider the resulting function selector, and not the internal type.
The text was updated successfully, but these errors were encountered:
Reproducible example
In
Test.sol:Foo
causes
This is because the internal function use different types, but
Z
andZ2
have the same underlying type, cause the external version to have function selector clash.Possible fix:
When constructing the
clashingFunctions
record, consider the resulting function selector, and not the internal type.The text was updated successfully, but these errors were encountered: