-
Notifications
You must be signed in to change notification settings - Fork 100
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
issues with functions returning this.type
#209
Comments
You should be extending your test suite with For the first invocation, at first glance this looks like another issue with the way types are handled in our macros. Similar to #60 . Not sure if this is fixable though without switching to scala-meta (basically a rewrite of ScalaMock then). I'll take a look. |
I probably got to
proxies should work in this case as we're mocking a simple trait, similar to Java interface thanks |
Hi guys! |
ScalaMock Version (e.g. 3.5.0)
4.0.0
Scala Version (e.g. 2.12)
2.11
Runtime (JVM or JS)
JVM
Please describe the expected behavior of the issue
There should be a way to mock traits/classes that have functions returning
this.type
Please provide a description of what actually happens
There's either a compile-time error or a
NoSuchMethod
(with proxies)Reproducible Test Case
You can try this with both
MockFactory
andMockFactory with ProxyMockFactory
. Firstone results in compile error:
Second one - in
NoSuchMethod
:This is probably related to #63
thanks
The text was updated successfully, but these errors were encountered: