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
Improve method resolution for trait method name bindings (#7364)
## Description
This PR improves method resolution for trait method name bindings, like
this following example:
```sway
script;
use std::time::Time;
pub fn main() {
let duration = Time::now().duration_since(Time::from(0)).unwrap();
let _ = duration + duration;
}
```
This fix is implemented in [Gather trait impls from the argument type
module when handling trait operator
calls.](8610000).
A general refactor was also done for associated method resolution
functions:
[Refactor
TypeCheckContext::find_method_for_type.](ace60ce)
[Refactor
resolve_method_name.](9d97d46)
Closes#7330.
## Checklist
- [x] I have linked to any relevant issues.
- [x] I have commented my code, particularly in hard-to-understand
areas.
- [x] I have updated the documentation where relevant (API docs, the
reference, and the Sway book).
- [ ] If my change requires substantial documentation changes, I have
[requested support from the DevRel
team](https://github.com/FuelLabs/devrel-requests/issues/new/choose)
- [x] I have added tests that prove my fix is effective or that my
feature works.
- [x] I have added (or requested a maintainer to add) the necessary
`Breaking*` or `New Feature` labels where relevant.
- [x] I have done my best to ensure that my PR adheres to [the Fuel Labs
Code Review
Standards](https://github.com/FuelLabs/rfcs/blob/master/text/code-standards/external-contributors.md).
- [x] I have requested a review from the relevant team or maintainers.
---------
Co-authored-by: IGI-111 <igi-111@protonmail.com>
0 commit comments