-
Notifications
You must be signed in to change notification settings - Fork 68
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 bug in contractimpl code generation for impl traits using associated types #1401
Conversation
This reverts commit c4b8cf1.
I wanted to do just as the error message said and replace the However, that then broke the contract spec generation, the But then digging further, it looks like So, in the interest of trying to do something I thought would be simple, I've gone with the approach that when the SDK macro first parses the |
I also had to increase the version requirement on the syn package. The sdk said it required any 2.0 version, but in practice we were using 2.0.77 in the repo. In this PR I started using some functions that were introduced somewhere along the way. The fuzz example has its own lock file and it was using 2.0.37, which it turns out doesn't have those functions. Minimum-version-selection, if Cargo ever adopts it, would prevent situations like this. |
What
Allow associated types in impl of traits, specifically the CustomAccountInterface.
Why
The use of associated types was allowed until v22 of the SDK, where an assumption in the code generation
contractimpl
macro is causing ambiguous code to be generated when associated types are in use.Close #1400