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
Mock (lazy) vals #40
Comments
This is expected behaviour because Scala doesn't allow a |
This is now mentioned as a known limitation in the FAQ: http://scalamock.org/user-guide/faq/ |
There is a comment from @paulbutcher on StackOverflow about scalameta making this possible. Is this now something that could be implemented? |
ScalaMeta is an interesting library but it will require significant rewrites to make use of it. ScalaMock relies on whitebox macros internally, which aren't exactly compatible and we'd need to transition away from that. Still worth looking at. |
a Scala
|
I want to mock classes having vals and lazy vals. When I try this:
I get the following compile error:
_ must follow method; cannot follow mockedInstance.mockMe.type
Am I doing this wrong or is this an error?
Thanks in advance for your help.
The text was updated successfully, but these errors were encountered: