- Materialize unit when its value is actually needed.
- Special-case Unit_getInstance return type at codegen. It should be a
proper Unit object instead of a "void"
In case internal inline function references private top level function
after inline such function (T.L.P.) couldn't be referenced
in klib and IC cache. So create internally visible accessors for P.T.L.
function similar to what JVM backend does.
- add box test
There was a problem with delegated extension property with dispatch
receiver that `this` in `getValue` call was set to dispatch receiver
instead of extension one
In the old backend, BindingContextSuppressCache is used (which is now
created explicitly in GenerationState), which looks up `@Suppress`
annotations on elements right before reporting the diagnostic. In JVM
IR, we clear the binding context after psi2ir, so this approach doesn't
work. This change provides another implementation of KotlinSuppressCache
which eagerly precomputes all suppressions on all annotated elements in
all source files at the point of creation of GenerationState (when the
binding context is still full).
#KT-43047 Fixed
In case if such class is used an type argument for field type make sure
that field initializer is being read.
Check type recursively.
- fix KT-41143
- update test
The problem here was that although the IR type of the expression was
primitive, the type of the actual expression in the bytecode generated
after type erasure was `Ljava/lang/Object;`, and we were trying to call
a non-existing method `Object.hashCode(Object)`.
#KT-41669 Fixed
In case of initializing property or function with anonymous object the
object is being exposed outside its field/function's scope and
accessible on previous level. In this case in `declarations only` mode
we have unbound symbols. Fix is to force body/initializer loading in
such cases.
Make sure it is deserialized in `declarations'only` mode too.
- Fix KT-40216
- Add test
Without this commit, JVM name mapping logic in BE does not work for FIR,
because FIR cannot use old BuiltInsPackageFragmentImpl descriptor.
In this commit we add our own implementation thus fixing
a pack of FIR black box tests.