See KT-49404 for details
In K1, within SubstitutingScope we approximate almost all the types
containing captured types are being approximated to either a lower or
an upper bound.
While mostly, it's being done correctly there are some problems with
approximations for flexible types
So, the parameter's type of A<in Any>::foo is approximated to Inv<in Any!>,
thus allowing to use Inv<*>, while it's obviously unsound.
NB: For the similar example, in B, there are regular TYPE_MISMATCH
because parameter for B<in Any>::foo is approximated to Nothing
Also, it's important to say that
- in K2 everything works because we don't use type approximation there
- approximation algorithm that works incorrectly is only being used in K1
^KT-54332 Fixed
Consider `class A : suspend () -> Unit {}`. Type checks such as `is A`
are now performed via a regular `instanceof` check instead of the special
checks for suspend lambdas.
Expanding macros such as __FILE__ or __TIME__ exposes
arbitrary generated filenames and timestamps from the compiler
pipeline which are not useful for interop and makes the klib
generation non-deterministic. This patch instead redefines
the macros to just map to their name in the properties
available from Kotlin.
Co-authored-by: Johan Bay <jobay@google.com>
- divide adapter.js into different files, which frameworks could load separately
- possibility to inject something to kotlin-test adapter by user
^KT-54418 fixed
Remove annotations, kotlin-stdlib-common, kotlin-stdlib.
Packing those libraries is wrong and probably unexpected. It leads to
artifacts size increase. Can be dangerous because of bad classpath.
And also have a reproducibility issue because of caching tricks around
KotlinVersionCurrentValue class.
KTI-942
#KT-54297 Fixed
Properly substitute surrogate UnitSerializer in the Companion.serializer()
function generated on classes that use polymorphic or sealed serializer
by default. (Fixes https://github.com/Kotlin/kotlinx.serialization/issues/1692)
Migrate KaptJavaLog to not used deprecated constructor in newer JDKs and instead set up the writers during initialization. This enables us to get rid of KaptJavaLog17.
Fixes KT-54030
Gradle Configuration Cache deserializer doesn't support Kotlin's
Objects of a Sealed Class. It creates new instance upon deserialization
and thus breaking equals contract in kotlin when's constructions.
See more info: https://github.com/gradle/gradle/issues/22347
^KT-54362
^KT-54339 Verification Pending