Skip to content

Backend Internal error: Exception during IR lowering when using inline fun with crossinline and anonymous object defined in another cell #368

Open
@ileasile

Description

@ileasile

Original error is: Local class should have its name computed in InventNamesForLocalClasses

Execute two cells:

class R {
    val x: Int = 1
}
inline fun R.t(crossinline action: (R) -> Int) = object {
    val y get() = action(this@t)
}

and

R().t {it.x * 2}

Result:

Backend Internal error: Exception during IR lowering
File being compiled: Line_316.jupyter-kts
The root cause java.lang.RuntimeException was thrown at: org.jetbrains.kotlin.backend.jvm.codegen.FunctionCodegen.generate(FunctionCodegen.kt:50)

Metadata

Metadata

Assignees

Labels

bugInstallation and functionality issues

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions