Hello, congrats on 2.0 release, i just upgraded o...
# android
l
Hello, congrats on 2.0 release, i just upgraded our stack and i am facing problems with unit tests now for a lot of code in unit tests its throwing me
kotlin.reflect.jvm.internal.KotlinReflectionInternalError: Unresolved class:
For example this is unit test:
Copy code
@Test
fun `on load success`() = gherkin {
    Given("load returns onLoad") {
        every { mockLoader.load(onLoad = capture(slotOnLoad)) } answers { slotOnLoad.captured.invoke() }
    }

    When("load is triggered") {
        mockLoader.loadBubble()
    }

    Then("verify ") {
        verify {
            //Method
        }
    }
}
So i am suspecting this change: https://kotlinlang.org/docs/whatsnew20.html#generation-of-lambda-functions-using-invokedynamic Where my load method is like this:
Copy code
fun load(
    onLoad: () -> Unit = {},
    onFail: () -> Unit = {},
)
Am i supposed to annotate this like it says or should i rewrite this somehow 🤔 ?