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

Add support for inline value classes when defining method's behavior #61

Closed
ghost opened this issue Jul 11, 2023 · 1 comment
Closed

Comments

@ghost
Copy link

ghost commented Jul 11, 2023

Following scenario

@JvmInline
value class A(val value: String)

interface Foo {
    fun bar(a: A, b: String)
}

mocker.every { mockFoo.bar(isAny(), isAny()) } returns Unit

throws java.lang.NullPointerException: Parameter specified as non-null is null: method bar, parameter a

This only happens when using constraints to define the method's behavior. It runs with success when replacing the constraints with values. It seems there's no support when using inline value classes, which would be a big plus.

@SalomonBrys
Copy link
Member

Inline classes are supported in version 1.15.0
https://github.com/kosi-libs/MocKMP/releases/tag/v1.15.0

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

No branches or pull requests

1 participant