mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
When a local function is captured, corresponding field accesses are later transformed by the inliner. It doesn't have enough information to restore the original semantics completely, so it has to rely on field names. Local functions can be overloaded or can have names matching local variable names, in both cases we generated fields with the same name for captured values. Now, we use the same '$<local-class-number>' suffix for field names for local functions as it is present in the corresponding local class name. This allows to distinguish captured local functions from captured local variables and between different overloads of a function with the same name. #KT-19827 Fixed #KT-18639 Fixed