Use the same condition as in the already existing `createIrEnumEntry`
function (and as in psi2ir): enum class should be final unless there's
an enum entry with any declaration other than its constructor.
#KT-57216
We are going to deprecate `WITH_RUNTIME` directive. The main reason
behind this change is that `WITH_STDLIB` directive better describes
its meaning, specifically it will add kotlin stdlib to test's classpath.
Instead of using methodSignatureMapper which was an obsolete hack to
make accessor names "getFoo" instead of "<get-foo>".
In particular, this keeps the `@Deprecated` annotation on the
corresponding property, which results in ACC_DEPRECATED in codegen.
#KT-43326 Fixed
In particular, `@Deprecated` is not lost anymore and accessors of
deprecated property are generated with ACC_DEPRECATED just as in the old
backend.
#KT-43327 Fixed
Extract the logic that computes ACC_SYNTHETIC flag for deprecated
declarations, and use `DeprecationResolver` as the old backend does in
`DescriptorAsmUtil.getCommonCallableFlags`. Creating IR-based
descriptors for each function to pass it there is a bit costly though,
so as a small optimization, use `allOverridden` to check if anything in
the method hierarchy is deprecated.
Also optimize `allOverridden` for the case of linear inheritance which
is far more common.
#KT-43199 Fixed
When copying top level declarations from multifile parts to facades,
also copy corresponding properties. This allows to keep their
annotations, which are later used in codegen (for example, to generate
ACC_DEPRECATED on property accessors), and allows to get rid of the hack
where the JVM name of the property accessor was computed prematurely via
methodSignatureMapper.
Also, don't copy `$annotations` methods for non-const properties to
facades because the old backend only generates them in parts (which
might be a separate problem, see KT-27644).
#KT-40262 Fixed