For example, synthetic `$annotations` methods for properties were
previously mangled to `$annotations-...`, which breaks annotation
loader, and fails an assert in ClassCodegen.generateMethod.
This was missing for IrFunctionReferences, which caused problems when
copying default parameters before CallableReferenceLowering in the
JVM_IR backend.
1. Scheme of capturing local variables not touched
2. Lowered local functions are transposed to the nearest class (including local) or file
3. Local classes are also transpose to the nearest class (including local) or file
In SourceCompilerForInline we could enter ERASED_INLINE_CLASS context
from containing declaration context. That broke codegen context
hierarchy invariants assumed in accessor generation.
In JDK 9, Class.simpleName changed behavior for local/anonymous Kotlin
classes (see KT-23072), this is why we now check for both variants of
the name in tests. Also, the format of annotation arguments changed a
little, where float parameters no longer have the trailing "f", and
class literals are rendered with ".class" at the end
For the inline class:
```
inline class IC(val x: Int)
```
Type (IC..IC?) should be mapped to the wrapper `IC`
because it can hold object and also because it does so for primitives
#KT-28983 Fixed
Initial problem is started in `capturedBoundReferenceReceiver` method
where we assume that bound receiver is captured for usual call.
Note that if method is inline then we don't pass actual name reference
receiver, but pass special CAPTURED_RECEIVER_FIELD, which is then
is used to find special instructions during inline and fold several
instructions in `foldFieldAccessChainIfNeeded`.
As a result, we got unboxed reference receiver for inline call, which
caused CCE and to fix it we should box receiver one more time during
inline
#KT-28188 Fixed
Note that this commit doesn't fix case when some inline class over
`Any` is returned from a lambda, it'll be fixed further as part of the
#KT-27586
#KT-27737 Fixed