Kotlin / kotlin-jupyter

Kotlin kernel for Jupyter/IPython
Apache License 2.0
1.12k stars 107 forks source link

Use of java.kotlin.time.Duration fails with java.lang.IllegalStateException #351

Open holgerbrandl opened 2 years ago

holgerbrandl commented 2 years ago

When using the new v1.6 duration APIs with

import kotlin.time.Duration.Companion.days

100.days

it fails with

Back-end (JVM) Internal error: Couldn't inline method call: days
Method: null
File being compiled: (1,5) in Line_69.jupyter-kts
The root cause java.lang.IllegalStateException was thrown at: org.jetbrains.kotlin.codegen.inline.SourceCompilerForInlineKt.getMethodNode(SourceCompilerForInline.kt:118)

Kotlin kernel v. 0.11.0.45, Kotlin v. 1.6.20-dev-6372

ileasile commented 2 years ago

I think it is https://youtrack.jetbrains.com/issue/KT-50516