Hi, I am getting below error while using k2 compil...
# k2-adopters
z
Hi, I am getting below error while using k2 compiler
Copy code
Kotlin: [Internal Error] org.jetbrains.kotlin.backend.common.CompilationException: Back-end: Please report this problem <https://kotl.in/issue>
/Users/zakirsaifi/Office/alfred/transactions/persistence/src/main/kotlin/com/syfe/alfred/TransactionsExtensions.kt:-1:-1
Details: Internal error in file lowering: java.lang.AssertionError: Error occurred while optimizing an expression:
CALL 'public open fun <get-createdAt> (): java.util.Date? [fake_override] declared in com.syfe.alfred.models.Transaction' type=java.util.Date? origin=GET_PROPERTY
  $this: GET_VAR '<this>: com.syfe.alfred.models.Transaction declared in com.syfe.alfred.toTransactionDto' type=com.syfe.alfred.models.Transaction origin=null
full error log is in the file
Copy code
val jvmTargetVal = JVM_17
    java.sourceCompatibility = JavaVersion.VERSION_17

    tasks.withType<KotlinCompile> {
        compilerOptions {
            freeCompilerArgs.set(listOf("-Xjsr305=strict"))
            jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17)
            languageVersion.set(KotlinVersion.KOTLIN_2_0)
        }
    }

    val compileTestKotlin: KotlinCompile by tasks
    compileTestKotlin.compilerOptions.jvmTarget.set(jvmTargetVal)
    compileTestKotlin.compilerOptions.freeCompilerArgs.set(listOf("-Xjsr305=strict"))
m
Hi, thank you. For me it looks like it's fixed in upcoming 1.9.0, however just to be sure cc @Ivan Kylchik
z
when 1.9.0 is going to be released?
m
You can expect 1.9.0-Beta in the middle of May or so.
i
@mglukhikh Actually I am not sure is it fixed or not, because it doesn’t look like interpreter error. By stack trace I can see that this error occur on some fir lazy class when we try to get annotations from it.
m
Then Zakir, could you please report a youtrack issue? It would be also helpful if you try to minimize the issue; probably it's provoked by the access of
createdAt: java.util.Date?
property from the file
TransactionsExtensions.kt
in your code. If minimization will be not possible, then please share the piece of code around this property access.