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 CallBase regression with explicitly implemented interface methods #558

Merged
merged 3 commits into from
Dec 26, 2017

Conversation

stakx
Copy link
Contributor

@stakx stakx commented Dec 26, 2017

This fixes #557.

which shows that `CallBase` no longer works for explicitly implemented
interface methods (which appear e. g. when `mock.As<TInterface>()` is
used).
While we could just revert 5837c53, that would reintroduce a slow and
hard to understand multi-line `if` condition. Let's instead rewrite
the original conditions such that no superfluous checks are performed,
and such that fast checks are performed first.

(Notably, checking whether a type is an interface is faster than
checking whether it is a class.)
@stakx stakx merged commit 7e12f34 into devlooped:master Dec 26, 2017
@stakx stakx deleted the callbase branch December 26, 2017 19:41
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.

Callbase not working on latest 4.8 version
1 participant