Skip to content
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: keep escaping closure attribute in mocks #71

Merged
merged 1 commit into from
Aug 14, 2024

Conversation

Kolos65
Copy link
Owner

@Kolos65 Kolos65 commented Aug 12, 2024

Up until this point, all attributes including @escaping were removed from function parameter types in the generated mock implementation to allow using them in other places than parameter positions. (ex.: enum cases)

This however is wrong when generating the producer resolver, that uses the function parameter types at closure parameter positions and needs to mark potential closure type parameters @escaping.

Also, inout was previously removed from closure parameters in the above process. This PR keeps it and adds support for inout types in willProduce clauses.

@Kolos65 Kolos65 linked an issue Aug 12, 2024 that may be closed by this pull request
@Kolos65 Kolos65 force-pushed the fix-escaping-function-parameters branch 5 times, most recently from c6fbaf7 to cf02bd4 Compare August 14, 2024 13:52
@Kolos65 Kolos65 force-pushed the fix-escaping-function-parameters branch from cf02bd4 to 106b77c Compare August 14, 2024 13:56
@Kolos65 Kolos65 merged commit 1899e63 into main Aug 14, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

willProduce loses @escaping annotation on closures
1 participant