-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Show error when contract method names conflict #6782
base: master
Are you sure you want to change the base?
Conversation
CodSpeed Performance ReportMerging #6782 will degrade performances by 50.4%Comparing Summary
Benchmarks breakdown
|
sway-core/src/semantic_analysis/ast_node/declaration/auto_impl.rs
Outdated
Show resolved
Hide resolved
sway-core/src/semantic_analysis/ast_node/declaration/auto_impl.rs
Outdated
Show resolved
Hide resolved
ce06771
to
041975f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just one nit
Actually, I noticed that the new errors aren't being passed to LSP. You can test this by installing |
This happens because the LSP still compiles everything using encoding v0, and this check only runs for encoding v1. See It used to be the case that LSP was not compatible with encoding v1. I am not sure this is still true. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good (aside from the nit from @sdankel)
When I enable the LSP to use encoding V1 (just removing from the |
f858fae
to
563b768
Compare
Description
Today, contract call uses the method name to identify which contract method to call. That means that a contract cannot have multiple methods with the same name.
That can happen when a contract implements traits:
A lot of the lifetime changes were caused by clippy.
Checklist
Breaking*
orNew Feature
labels where relevant.