-
-
Notifications
You must be signed in to change notification settings - Fork 802
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
Changed behavior with explicit interface implementations #133
Comments
It was definitely an accident that it ever worked ;) /kzu from mobile
|
This is fixed in Moq 4.7.58. |
I think I've discovered a change in behavior from version 4.2.1402 to 4.2.1408. The following test used to pass but no longer does:
The test failure message is as follows:
From debugging it seems like the difference is simply that in 4.2.1402, the line
((I)target.Object).B()
does in fact call the implementation ofB
onC
, as if the CallBase property on the mock were set to true, while in 4.2.1408 it doesn't get called. It also only gets called in 4.2.1402 whenB
is defined as an explicit interface implementation. In other words, if you change the signature topublic void B()
the test fails on the old version as well.The test passes in both versions if I set
CallBase
to true.Is it just an accident that this ever worked? I haven't figured out which particular commit changed the behavior yet, so I can't be sure.
The text was updated successfully, but these errors were encountered: