Files
kotlin-fork/compiler/testData/codegen/bytecodeText/fieldsForCapturedValues
pyos e1520c61da IR: use parameters for captures in field/instance initializers
val y = 1
    object { val x = y }
  ->
    class XKt$1(`$y`: Int) { val x: Int = `$y` }

Note that `$y` is not stored in a field because it's not used outside
the primary constructor.

One exception is captured inline parameters on the JVM backend, as the
bytecode inliner uses field assignment instructions (setfield) to locate
them; removing the field is thus not possible.
2021-09-29 16:25:43 +02:00
..