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

Mocking objects with generic metatype as a method parameter #102

Closed
szymonll opened this issue Jan 10, 2018 · 4 comments
Closed

Mocking objects with generic metatype as a method parameter #102

szymonll opened this issue Jan 10, 2018 · 4 comments
Labels

Comments

@szymonll
Copy link

szymonll commented Jan 10, 2018

During development I have encountered a problem with mocking the objects with generic metatype like:

func example<T>(with typeParam: T.Type)

After mocking an object with function like the one above, the resulting generated Mock fails the build with error
Swift Compiler Error (in Mock.generated.swift): Use of undeclared type ‘T’

I would like to ask if the issue is known for you and if there is solution for the problem?

@szymonll szymonll changed the title Mocking objects with Type.self as a method parameter Mocking objects with generic metatype as a method parameter Jan 10, 2018
@amichnia
Copy link
Collaborator

@szymesl the problem should be already resolved. We are aware of that, and the fix is already on develop.

It will be in upcoming release, tomorrow or friday - we will release either 2.0.0 or 1.0.3 (depending if we prepare all things needed for 2.0)

@szymonll
Copy link
Author

szymonll commented Jan 10, 2018

Thank you for the fast reply! So I am looking forward to update the SwiftyMocky.

@amichnia
Copy link
Collaborator

@szymesl - version 2.0.0 is swift and ready :) Feel free to check it out.

@szymonll
Copy link
Author

Great news! Thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants