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
# Description
## Problem\*
Resolves#3471Resolves#3474
## Summary\*
Implements support for generics on the trait directly. E.g. `trait
Into<T> { ... }`
## Additional Context
The old `trait_generics` test has been renamed to `trait_impl_generics`
- I think this is more accurate. There is a new test in `trait_generics`
now which tests the generic traits added by this PR.
I've discovered two new bugs in writing this PR, which are commented in
the `trait_generics` test. I'll make issues for them now.
## Documentation\*
Check one:
- [ ] No documentation needed.
- [x] Documentation included in this PR.
- [ ] **[Exceptional Case]** Documentation to be submitted in a separate
PR.
# PR Checklist\*
- [ ] I have tested the changes locally.
- [ ] I have formatted the changes with [Prettier](https://prettier.io/)
and/or `cargo fmt` on default settings.
Aim
Currently it is possible to use generics within a trait:
Expected Behavior
A trait allows methods with a generic return type:
Bug
When creating the implementation the compiler throws a confusing error:
Linked issue: #3502
To Reproduce
Compile the following:
Installation Method
Binary
Nargo Version
0.19.2
Additional Context
No response
Would you like to submit a PR for this Issue?
No
Support Needs
No response
The text was updated successfully, but these errors were encountered: