You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Throwing a descriptive error upon encountering inline function #1030
Inline functions are not supported as mentioned in README and here. Currently, when mocking behaviour of the inline function, the body of the function ("real" implementation) starts to execute, leading to errors that are difficult to debug and pinpoint to mockk (or the function itself being inline). It would be great to have a fail-fast approach, where Mockk would fail right away with an error when trying to mock an inline function.
Prerequisites
Please answer the following questions for yourself before submitting an issue.
I am running the latest version
I checked the documentation and found no answer
I checked to make sure that this issue has not already been filed
Expected Behavior
Encountering a meaningful error describing that mocking inline functions isn't supported.
Current Behavior
When mocking, code of the inline function (actual one, not the mocked one) starts to execute with unpredictable and hard-to-debug consequences.
Hi 👋 Can I take a look at this issue? :)
It's a bit old, but I was wondering if this issue has been resolved? If not, I would like to contribute to fixing it
Activity
ch200203 commentedon Aug 7, 2025
Hi 👋 Can I take a look at this issue? :)
It's a bit old, but I was wondering if this issue has been resolved? If not, I would like to contribute to fixing it
Raibaz commentedon Aug 7, 2025
Sure, go ahead, thanks!
ch200203 commentedon Aug 8, 2025
Thanks! 🙌
I’ll work on this and try to open a PR within this week for your review.
ch200203 commentedon Aug 11, 2025
I’ve submitted a PR for this issue.
Would appreciate it if you could review it when possible. Thanks! 🙏
tulsishuka commentedon Aug 11, 2025
sir can work on it if pr is not merge
injae-kim commentedon Aug 11, 2025
Fix PR: #1421 PTAL~ 👍
Merge pull request #1421 from ch200203/fix/1030-inline-function-error