I have this function : ```override val isExecutabl...
# multiplatform
j
I have this function :
Copy code
override val isExecutable: (LoginViewState) -> Boolean = {
    it.isLoading &&
            it.email.value.isNotEmpty() &&
            it.password.value.isNotEmpty()
}
when I put a break point within the lambda and test
it.email.value.isNotEmpty()
I get the following error
org.jetbrains.kotlin.codegen.CompilationException : Back-end (JVM) Internal error: Failed to generate expression: KtCallExpression
File being compiled: (1,16) in /fragment.kt
The root cause java.lang.IllegalStateException was thrown at: org.jetbrains.kotlin.codegen.state.KotlinTypeMapper$Companion.getPackageMemberContainingClassesInfo(KotlinTypeMapper.kt:1402)
If I replace
it.email.value.isNotEmpty()
by
it.email.value.length > 0
it works. What am I doing wrong here? PS : I get this error in my KMM project but I feel it’s more of a kotlin-wide issue. Now that
general
is read-only, where am I suppose to ask this kind of questions?
I get the error while running the function from a @Test method
a
Hi, is the code located in the common source set? By test do you mean evaluate expression? Probably, it may be relevant to the issue: https://youtrack.jetbrains.com/issue/KTIJ-17713 or at least share the same root cause.
j
Yes the piece of code is located in common, and I evaluate it while debugging a test function located under
androidTest