-
Notifications
You must be signed in to change notification settings - Fork 562
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
bug: generic structs where generic is bounded to some trait fails on type deduction to compile when implemented #2995
Comments
It fails on a cycle by any chance? |
Yes. My bad forgot to attach stacktrace |
Stacktrace attached |
@spapinistarkware would like to take this issue.
|
@gilbens-starkware is working on this. Separating impl to declaration is less good IMO, since you can also have the cycle in the generics themeselves. |
Hmm, yeah, I think your solution is better. But would you say that having |
Im general, the declaration separation is important in order to make other functions still compile even if the body of this item doesn't. |
Makes sense |
Solved in #3360. |
Bug Report
Cairo version:
1.0.0-alpha.7
Current behavior:
If as in code below one doesn't provide
TCopy
andGCopy
as here... of Copy<B<T, G>>
compiler will crash trying to deduce possible implementations ofCopy
traitGeneric structs where generic is bounded to some trait fails to compile when one wants to implement any trait.
Expected behavior:
Compiles succesfully. Also would be great to implement following rust's RFC.
Steps to reproduce:
Compile code below.
Related code:
initially stubmled upon trying to compile this:
Other information:
The text was updated successfully, but these errors were encountered: