When meck:new(Mod, [passthrough]) is called to mock a module that is not compiled with +debug_info it will still return ok.
When a call is made to a function in that module it crashes:
1> meck:new(mymod, [passthrough]).
** exception error: undefined function mymod_original:function/0
in function meck:exec/4
in call from mymod:function/0
called as mymod:function()
The fault is that the renamed original was never created.
Reproduced. The resolution would be to make new fail, right?
Yes, with a more informative error.