-
Notifications
You must be signed in to change notification settings - Fork 992
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix using for global function name collision #1625
Conversation
Nope, Solidity doesn't support overloading functions in the Taking this code snippet as an example: pragma solidity >=0.8.17;
type UD60x18 is uint256;
using { foo } for UD60x18;
function foo(UD60x18 x) pure returns (UD60x18 result) {
result = x;
}
function foo(UD60x18 x, UD60x18 y) pure returns (UD60x18 result) {
x;
result = y;
} Will produce this error:
|
Can we add a test for this one? |
Can we add the test to the CI? Do we actually need foundry to run this example? |
I'm sorry to chase, but are there any updates here? Is this fix still slated to be included in v0.9.3? |
c493c28
to
3c0ef74
Compare
@montyly I added a test. @PaulRBerg This will be included in the upcoming release |
Amazing news thanks so much ser @0xalpharush!! Our audits are slated to start on March 20, so I'm glad that we will be able to run Slither until then. |
Sync master with dev
Both
SD59x18
andUD60x18
defined amul
function and globally bind the function to the type which wasn't being handled by_analyze_top_level_function
. I don't think overloading can be done in a using for but that should be investigated.Fix #1607