Back-end (JVM) Internal error: Failed to generate expression: KtNameReferenceExpression
File being compiled: (1,28) in Line_7.jupyter-kts
The root cause java.lang.UnsupportedOperationException was thrown at: org.jetbrains.kotlin.codegen.context.ConstructorContext.getOuterExpression(ConstructorContext.java:65)
See attached notebook (zipped because github does not allow ipynb attachments to tickets) for complete example.
Consider the following example![image](https://user-images.githubusercontent.com/200952/141848059-489cb5d9-b14b-4f3e-bf2c-f470169fb62f.png)
This fails with
See attached notebook (zipped because github does not allow ipynb attachments to tickets) for complete example.
RandomInit.ipynb.zip
This code is legit in a main
Environment: Windows10 & Kotlin kernel v. 0.10.3.31, Kotlin v. 1.6.20-dev-3702