This is required to be able to compile KGP and it's dependencies which
set LV to 1.4 when repo will use LV 1.9. This caused by the change how
enums are compiled (KT-48872).
Usage of this function is unsafe because it does not have native compiler
support. This means that compiler won't report UNCHECKED_CAST,
CAST_NEVER_SUCCEED or similar diagnostics in case of error cast
(which can happen immediately or after some refactoring of class hierarchy)
But still compile stdlib, reflect, kotlin.test and scripting runtimes
with JVM target 1.6 to simplify migration from Kotlin 1.6 to 1.7.
#KT-45165 Fixed
Please read the description of IDEAPluginsCompatibilityAPI.
Also, you may notice, that Deprecation annotation was removed.
That is because with level ERROR it isn't possible to opt-in
to such API in the legit cases. And with level WARNING it won't be
reported because We have diagnostic with level ERROR about OptIn marker.
Sadly, there is no way to add ReplaceWith to the OptIn marker
Mostly, it only affects FIR
It partially allows to consider several variance of constraints like
A<Int> & A<T> <: A<X_var> that are mostly brought by smart casts
^KT-49542 Fixed
^KT-50489 Relates
Methods `needToGenerateAdditionalMembersInClass` and
`needToGenerateNestedClassifiersInClass` are removed, now compiler
uses `get...Names` and `getTopLevel...` methods to determine which
extension may generate declaration with specific classId/callableId
This is needed to simplify API of FirDeclarationGenerationExtension and
provide guarantee that `generate...` method will be called with
specific classId/callableId only if specific extensions returned name
for this id from `getName...` functions
There seems to be no point in configuring the compiler argument per
project. This argument will be deleted soon anyway, when we remove
support for JDK 1.6 & 1.7.
Also remove `disableDeprecatedJvmTargetWarning`. It didn't have any
effect in all modules where it was applied because these modules
reassign `freeCompilerArgs` anyway, with
`-Xsuppress-deprecated-jvm-target-warning` in it.
`radixPrefix` is used only in IDE now. So let's put it into IDE modules.
This commit is done in order to be able to use code dependent on
`radixPrefix` in `kotlin-ide` repo, because `kotlin-ide` depends on
1.4.0 artifacts of compiler. And `radixPrefix` isn't presented in
those artifacts