-
-
Notifications
You must be signed in to change notification settings - Fork 603
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
AutoMockable does not generate valid Swift code during method generic requirement parsing #1285
Comments
Seeing this on one of our protocols as well, are there any versions that didn't have this bug I can update to? Specifically a couple of functions in the protocol have: |
Hello @Vrezhg , thank you very much for your question! 🤝 The feature to support methods with generic requirements is something totally new to Sourcery, and was never working 100%. To implement this, it is a matter of adjusting Hope this helps! 👍🏻 I would be able to implement this myself by the end of April, currently being busy with other stuff 🧑🏭 |
Given
When I run Sourcery
Then I see the output:
Context
Here, lines
are not compiling because
Item
type was taken from method's generic requirements.Sourcery should be able to recognize if the type is
generic
and use facilities provided alongType.swift
, that is,isGeneric
andgenericRequirements
to correctly substitute such types using eitherAny
or, preferablytype.typeName.actualTypeName
which would include protocol composition or a single protocol type.Related to: #1284 and #1029
The text was updated successfully, but these errors were encountered: