It's probably not possible (or at least no easy) to make sure that do_return is only used with objects that match the return type of the mocked function, but it should at least be possible I would think to compare the size to the size of the default return object and make sure they match. This would prevent some kinds of user errors (including ones I've made in the field).
It's probably not possible (or at least no easy) to make sure that do_return is only used with objects that match the return type of the mocked function, but it should at least be possible I would think to compare the size to the size of the default return object and make sure they match. This would prevent some kinds of user errors (including ones I've made in the field).