Releases: JetBrains/kotlin
Releases · JetBrains/kotlin
Release list
Kotlin 2.4.10-RC
Changelog
Compiler
KT-86939JVM: IllegalStateException "No value for annotation parameter" when using const val in nested Java annotation array argumentKT-83766K2: Wrong sourcePsi is set forSymbolPsiLiteralin SLC for annotation arguments referencing a const valKT-86728Reified type inference: expected type not propagated into inline call inside lambda with elvis operator
Compose compiler
b/522127447Fixed a bug that was making the stability of pre-cast types be used in certain skipping checks instead of the stability of post-cast types
Klibs
KT-86501Native: IrTypeAliasSymbolImpl is already bound. Signature: kotlinx.datetime/Instant|null[0] on iosSimulatorArm64
Tools. CLI
KT-86930Introducekotlinrin the Kotlin distribution
Tools. Gradle. JS
KT-86057kotlinUpgradeYarnLock skips lock file regeneration when kotlinNpmInstall is up-to-date, causing kotlinStoreYarnLock to fail
Tools. Gradle. Multiplatform
KT-87084False positive warning for JS and Wasm compilations when CRI is enabled
Tools. Scripts
Kotlin 2.4.20-Beta1
Changelog
Analysis API
KT-85418Implement an API for accessing deserialized file annotations in Analysis APIKT-74448K2. False positive MISSING_DEPENDENCY_SUPERCLASS in LinkedListTest.kt, kotlinx.coroutinesKT-85856containingSymbol of constructor property differs for local and non-local classes
Analysis API. Code Compilation
KT-76457K2 IDE / KMP Debugger: KISEWA “Cannot compile a common source without a JVM counterpart” on evaluating inline fun from common module inside jvm
Analysis API. FIR
KT-70552No expects for actualKT-86014Types are broken after remove parameter through change signatureKT-86363KotlinIllegalArgumentExceptionWithAttachments: No dangling modifier found on companion blocksKT-86147Dropkotlin.parallel.resolve.under.global.lockregistry keyKT-85543Avoid lazy resolve for the contracts phase if no constracts might be resolved
Analysis API. Infrastructure
KT-86186Analysis API: Codebase tests run twice in some analysis modules — pick a single JUnit runner and migrateKT-85360Drop kotlin-compiler-testdata-for-ide artifactKT-85585Simplify the dependencies graph for the Analysis API modulesKT-85381Remove tests for the FE10 implementation
Analysis API. Light Classes
New Features
KT-84645Support resolving to companion block members & extensions from Java (light classes)KT-80775Support PsiClass#getRecordComponents in light classes
Fixes
KT-57537SLC: propagate default parameter value from (@JvmOverloads)expectdeclarations toactualdeclarationsKT-63568Symbol Light Classes: KtAnnotationApplicationWithArgumentsInfo.normalizedArguments() may work incorrectly when psi is not setKT-70428AA: good code is red when a Java class extends a Kotlin class implementing MutableList by delegationKT-36740MPP: False-positive incompatible types in .java when using expect-class returned by non-expect member from common when actual is actual typealiasKT-67749Analysis API: Symbol Light classes should be available only to pure JVM sourcesKT-85040[Analysis API] Improve Java / Kotlin interop in KMP projectsKT-68169K2 IDE. KMP. False positive type mismatch in java file of jvm source-set when using common declaration which expects StringKT-37783KMP Java Interop: JVM-only methods on actual superclass not resolved in Java for common subclassKT-40059Provide type correction for expect/actual types used from Java-codeKT-71429MPP: False positive "Function1 is not a functional interface" when calling code from Common in JavaKT-70426SLC: kotlin.Collection#size is not exposed by defaultKT-60480Symbol Light Classes: Classes implementing kotlin.collections.* interfaces don't implement all methods from the corresponding java.util.* interfacesKT-36991IDE: "both methods have same erasure" for Java classes directly or indirectly extending Kotlin collectionsKT-22594KotlinCollection.getSize is not highlighted as an error in Java
Analysis API. PSI
KT-85052Move mutation methods out of the Kotlin PSIKT-84925Move KtReference to the Kotlin IntelliJ pluginKT-85427Use factory-like pattern instead of reflection in KtNodeTypeKT-84789Ensure allKtClassBody.parentusages are correctKT-85154PSI: "AE: parent is ERROR_ELEMENT" with top-level destructuring declaration
Analysis API. Providers and Caches
KT-82220Analysis API: Support platform-specific session components and checkers in metadata sessionsKT-82731Analysis API: Limit granular tree change processing to a few files
Analysis API. Standalone
KT-85112AA does not see packages from unpacked klibsKT-86417Support parameters in 'getExpectsForActual()'KT-84916Metadata stub deserializers aren't properly set up for Analysis API StandaloneKT-83191Analysis API: JvmDependenciesIndexImpl performs very poorly for large classpaths
Analysis API. Stubs and Decompilation
KT-86520KotlinDeclarationInCompiledFileSearcher doesn't support visibility-mangled declarationsKT-64901Inconsistency between AST and Stub tree in the case of non-local destructuring declarationsKT-84444Support stubs for companion blocks & extensions
Analysis API. Surface
New Features
KT-73214AddKaScope#declarationswith name filterKT-69085Provide API to retrieve label/name from KtFunctionLikeSymbolKT-70771KaLocalVariableSymbol: supportisDelegatedPropertyKT-85239Streaming version of collectDiagnostics()KT-85037Add API for KaFunctionType's returnType modificationKT-80460AA: IntroduceKtExpression.isStableForSmartCastingAPIKT-82519Automatically recognize the appropriate analysis mode for in-memory file copies based on their contentKT-65912Analysis API: Implement type building API for all KtType
Fixes
KT-66039K2: Analysis API: redesign resolution APIKT-70794K2 IDE: Reference to object does not resolve as LHS in "plusAssign" assignment expressionKT-70774Unary operators on literals are not resolvableKT-86757Flaky annotations result for@allannotation on a backing fieldKT-85382Remove the FE10 implementationKT-86681[Analysis API] MoveisDelegatedtoKaVariableSymbolKT-86685collectCallCandidates works incorrectly for a constructor vs. a companion invokeKT-86514No expected type within collection literal in annotation entry using array rather than varargsKT-76076K2 AA: safe call expression navigates to parent array index access expressionKT-86418Support property accessors in 'getExpectsForActual()'KT-71312KaFirPsiJavaClassSymbol.{hasAnnotations, annotationSimpleNames}is inconsistent withFirJavaClassimplementationKT-86394Resolve from KDoc reference is inconsistent with source codeKT-86248isUsedAsExpressiontrue for typealias lhs in ::KT-85778Analysis API: Ensure that all public endpoints in implementation modules are internal or opt-inKT-78285resolveToCallCandidates inconsistent behaviour with invoke operator and constructorKT-85852CCE in buildClassTypeKT-85989Super type references should be aware of type alias constructorsKT-84184[Analysis API] Provide a unification substitutor APIKT-84584Support companion extensions and blocks in the Analysis API- [
KT-84932](https://yo...
Kotlin 2.4.0
Changelog
Analysis API
KT-83867OVERLOAD_RESOLUTION_AMBIGUITY false positive with assertEquals in IJ repoKT-83723[Analysis API] Enable experimental KDoc resolver by defaultKT-83388Analysis API: properly support KMP in KotlinPackageProviderKT-65683Analysis API: Dangling file session creation causes acomputeIfAbsentcontract violation
Analysis API. Code Compilation
KT-78946Evaluation of variable with local class in type parameter leads to InventNamesForLocalClasses exception
Analysis API. FIR
KT-68260K2 AA: InvalidFirElementTypeException “For CALLABLE_REFERENCE_EXPRESSION with text::lam1, unexpected element of type: no element found” with illegal callable reference callKT-70896AA: False positive deprecation warning with override of built-in method in JDK mapped classKT-84711K2 IDE sometimes loses FIR plugin-generated declarations after file changesKT-84625Analysis API: collectDesignationPath fails for nested classes inside plugin-generated top-level classesKT-84596Improve K2 Jooq completion performanceKT-84525KaValueParameterSymbol#getHasSynthesizedName returns false for FirDeclarationOrigin.SubstitutionOverride.DeclarationSiteKT-83546Kotlin analysis reach ClsCustomNavigationPolicyKT-84259Move CommonDefaultImportsProvider to the frontend independent moduleKT-82945Analysis API: KotlinIllegalArgumentExceptionWithAttachments: Expected FirResolvedTypeRef with ConeKotlinType but was FirUserTypeRefImplKT-71135AA: exception from sealed inheritors checker whenanalyzeCopy
Analysis API. Infrastructure
Fixes
KT-83905Analysis API: Improve UX with test dataKT-84913Extract compiler classes used by the PSI & Analysis API to a separate moduleKT-64986Analysis API: Implement Analysis API tests for different KMP PlatformsKT-84776The test data manager misses the redundancy check in the update modeKT-84962The test data manager misses -ea flagKT-84388Preserve the EOF status in the test data manager to avoid extra changesKT-84362Analysis API tests produce many warnings due to "not yet loaded registry"KT-84279Test Data Manager fails on a clean buildKT-83913Exclude compiler-based Analysis API tests from Git trackingKT-80379Extract per-module test generators for AA testsKT-84120Move CLI modules out of kotlin-compiler-fe10-for-ideKT-83200Track external dependencies of the Analysis API modules
Analysis API. Light Classes
KT-82434Light classes should prefer enum entries to propertiesKT-84200SLC: return type is not boxed for delegated methods with generic original methodKT-72451"CCE: class PsiPrimitiveType cannot be cast to class PsiClassType" with same-named enum class and typealias
Analysis API. PSI
KT-84715removeModifier doesn't delete whitespaces around the removed modifierKT-84564KtEnumEntry.delete deletes semicolonKT-84781Use computed properties in KotlinElementTypeProviderImplKT-83846Set up guidelines for PSIKT-84135Deprecate KtSelfType
Analysis API. Providers and Caches
KT-82731Analysis API: Limit granular tree change processing to a few filesKT-79234Analysis API: Usage ofasMap()on Caffeine caches bypasses stats countersKT-74090Analysis API: Support dumb mode (restricted analysis)
Analysis API. Standalone
KT-83801Nested typealiases are not correctly indexed in standalone mode
Analysis API. Stubs and Decompilation
KT-85371StackOverflowError from LLKotlinStubBasedLibrarySymbolProvider and StubBasedClassDeserializationKT-83935Support KDoc loading in decompiled stubs
Analysis API. Surface
New Features
KT-85239Streaming version of collectDiagnostics()KT-82519Automatically recognize the appropriate analysis mode for in-memory file copies based on their contentKT-73534SAM method APIKT-82993Support explicit backing fields in the Analysis API
Fixes
KT-79186KtCompletionExtensionCandidateChecker does not work for extensions when using callable references of a typeKT-83759Analysis API: Mark platform interface APIs with@KaPlatformInterfaceKT-83921Extend KaKDocProvider to read Kdoc from KLIB metadataKT-77426KaFirCompilerFacility uses an arbitrary JVM counterpart for common sourcesKT-84737KaCallableSymbol#directlyOverriddenSymbols doesn't work for java overrides of kotlin propertiesKT-84621Migrate symbol tests to ManagedTest properlyKT-80575KaFirJavaInteroperabilityComponent#getJavaGetterName should not throw exception on incomplete codeKT-84397KtDefaultAnnotationArgumentReference should return only results with value nameKT-84804buildSubstitutor does not work correctly with Java type parametersKT-84389Cover references with ABI and documentation checksKT-57042K2, Analysis API: KaJavaInteroperabilityComponent#callableSymbol returns null for a Java getter implementing Kotlin propertyKT-80856Analysis API:analysisContextModuleincorrectly determines the module of an original file when used for dangling file context assignmentKT-84363AA, isUsedAsExpression: Unhandled Non-KtExpression parent of KtExpression: class org.jetbrains.kotlin.psi.KtContractEffectKT-70476Analysis API: "KtDefaultAnnotationArgumentReference.resolveToSymbols" does not work in FIR implementationKT-68499Split KtDefaultAnnotationArgumentReference on K1 and K2 implementationKT-70521Analysis API: Impossible to distinguish between 'iterator' operator calls dispatched with imports from objectsKT-77669Context arguments are missed on implicit invoke callsKT-77670resolveToCall: extensionReceiver is incorrectly chosed due to a conflict with context parameters for an implicitinvokecallKT-68633K2 AA: IAE "Expected class KaClassSymbol instead of class KaFirEnumEntrySymbol" with enum entry initializerKT-83777Analysis API: The resolution scope of a context module accepts elements from associated dangling filesKT-82571No expected type for overridden property without explicit typeKT-83223Support "Explicit context arguments" in the Analysis APIKT-65186K2: Analysis API: KtExpressionTypeProvider.getExpectedType works incorrectly for the right hand side of assignment expressionsKT-76011KaFirNamedClassSymbol#companionObjectdoesn't provide generated objects generated by compiled plu...
Kotlin 2.4.0-RC2
Changelog
Backend. J2KLIB
KT-86367[JKLIB] kotlin.Cloneable built-in class not found
Compose compiler
b/511102714Made the default stability of non-final classesUnknown
instead ofStable
Tools. Build Tools API
KT-86395[BTA] forward-compatibility violation: NoSuchMethodError on JvmSnapshotBasedIncrementalCompilationConfiguration. breaks IC
Tools. Gradle
KT-86346Compiler warnings printed twice in console — once asw:and again as Gradle "Problem found:" block
Tools. Gradle. BCV
KT-86268ABI validation tasks fail with Unsupported platform toolchain type when using kotlin.compilerVersion pointing to an older compiler after BTA migration in 2.4.0-Beta2
Tools. Gradle. Wasm
KT-86457[Wasm, Gradle] BinaryenExec.standardOutput is silently ignored after migration to Gradle Workers
Kotlin 2.4.0-RC
Changelog
Backend. J2KLIB
KT-84877[J2KLIB] Remove withKotlinBuiltinsHack present in JKlibIrLinker.ktKT-85846Tests failing with fake override property missing accessors or backing fieldKT-85717IllegalStateException due to already bound symbolKT-86204[JKlib] Propagate private members from dependecies in the IR tree
Compiler
KT-86210Update -Xannotation-default-target CLI parameter docKT-85948Contracts in 2.4 stdlib is not compatible with 2.3 compilerKT-85957Contract on function is getting discarded if any of effect declarations is unknownKT-86130False positive UNINITIALIZED_ENUM_COMPANION on LV 2.3 and lowerKT-84860False positive UNINITIALIZED_ENUM_COMPANION in enum access with explicit receiver in enum initializer when enum class has a companionKT-84319Add JVM target bytecode version 26KT-85825Context parameter lambda loses context type when wrapped in nestedrunblocksKT-84960Property contract leaks unsubstituted type parameter in smart cast
Compose compiler
b/509945632Do not generate groups in inline lambdas without@Composablecalls
IR. Interpreter
KT-86083Create a new CLI flag to enableIntrinsicConstEvaluationfeature
JVM. Reflection
KT-86017KClass.constructors returns all java.lang.String constructors for mapped type kotlin.StringKT-85999Reflection: ByteArray KType incorrectly has type arguments in Kotlin 2.4.0
Libraries
KT-86027Hide returnsResultOf under a separate flag and remove its usages from kotlin stdlib
Native
KT-84733LLVM Update: rebase LLVM once the upstream stabilizes
Tools. Compiler Plugin API
KT-85969KtLint incompatible with Kotlin 2.4.0-Beta2 (parsing errors / Extensions storage issue)
Tools. Compiler Plugins
KT-86170PowerAssert: Stabilize runtime ABI for initial releaseKT-85250PowerAssert: Automatically add runtime library dependency
Tools. Compiler plugins. Serialization
KT-85554Serialization: "IndexOutOfBoundsException" on property generated by Compose pluginKT-85963IncompatibleClassChangeError: Expected non-static field $stableon deserialization of@Serializabledata class when Compose compiler plugin is applied before Serialization plugin
Tools. Gradle
Tools. Gradle. Multiplatform
KT-85877The number of SPM direct dependencies is multiplied on number on targetsKT-85706SwiftPM Import: Updating package version in build script updates version in the lock fileKT-83370Incorrect metadata transformation for stdlib's webMain source set
Tools. Gradle. Native
KT-85984linkReleaseFrameworkIosSimulatorArm64 is executed during Debug iOS build since 2.4.0-Beta2KT-86024Empty main compilations cause w: [COMPILER_ARGUMENTS_WARNING] There are libraries in -friend-modules CLI argument that are not included in -library CLI argument:
Tools. Gradle. Wasm
KT-85974K/Wasm: Do not set -Xir-per-module for Wasm tasks
Kotlin 2.4.0-Beta2
Changelog
Analysis API
KT-65683Analysis API: Dangling file session creation causes acomputeIfAbsentcontract violation
Analysis API. FIR
KT-70896AA: False positive deprecation warning with override of built-in method in JDK mapped classKT-84625Analysis API: collectDesignationPath fails for nested classes inside plugin-generated top-level classes
Analysis API. Infrastructure
KT-84913Extract compiler classes used by the PSI & Analysis API to a separate moduleKT-64986Analysis API: Implement Analysis API tests for different KMP PlatformsKT-80379Extract per-module test generators for AA tests
Analysis API. PSI
KT-84715removeModifier doesn't delete whitespaces around the removed modifierKT-84564KtEnumEntry.delete deletes semicolonKT-84781Use computed properties in KotlinElementTypeProviderImpl
Analysis API. Stubs and Decompilation
KT-85371StackOverflowError from LLKotlinStubBasedLibrarySymbolProvider and StubBasedClassDeserializationKT-83935Support KDoc loading in decompiled stubs
Analysis API. Surface
KT-82519Automatically recognize the appropriate analysis mode for in-memory file copies based on their contentKT-85239Streaming version of collectDiagnostics()KT-83921Extend KaKDocProvider to read Kdoc from KLIB metadataKT-77426KaFirCompilerFacility uses an arbitrary JVM counterpart for common sourcesKT-84737KaCallableSymbol#directlyOverriddenSymbols doesn't work for java overrides of kotlin propertiesKT-84621Migrate symbol tests to ManagedTest properlyKT-80575KaFirJavaInteroperabilityComponent#getJavaGetterName should not throw exception on incomplete code
Backend. Wasm
KT-76205K/Wasm: stabilize and turn on incremental compilation by defaultKT-83728[Wasm] Invalid Ir type while suspend call with blocked if null comprehansionKT-81637K/JS/Wasm interop: Inconsistent behavior ofis/asoperations forJsReference<C>andC
Compiler
New Features
KT-84484Companion Extensions Analysis & ResolutionKT-84298K2: Generate IR for Companion Blocks & ExtensionsKT-84292Enforce Companion Blocks & Extensions Language Feature during ResolutionKT-84291Companion Blocks & Extensions CheckersKT-84290Callable References to Companion Block Declarations & ExtensionsKT-84287Build Raw FIR for Companion Blocks & ExtensionsKT-73256Implementallmeta-target for annotationsKT-84319Add JVM target bytecode version 26KT-84297Serialize & Deserialize Companion Block Declarations & Extensions to/from MetadataKT-84199Implement DontMakeExplicitNullableJavaTypeArgumentsFlexible feature
Fixes
KT-80489Collection literals: experimental version (Frontend)KT-84566Prevent launching Default dispatcher threads from IJ SDK in kotlin compilerKT-85358Native: roll back the workaround for KT-84678 once MapLibre has been properly fixedKT-84931Incorrect type nullability in SAM super type in anonymous class-based SAM conversionKT-83920False positive "modifier 'value' is not applicable to 'local variable'" with soft keyword in positional destructuring (square bracket) declarationKT-85626@JvmRecordin commonMain breaks compileCommonMainKotlinMetadata with "Cannot access 'java.lang.Record'"KT-52673Don't report deprecation warning/error on importsKT-84991ImproveArgument type mismatchdiagnosticsKT-82216Sanitize '.kotlin_module' filenameKT-84678K/N: Undefined symbol from SPM-added ObjC frameworks when linking iOS targetKT-77726Move FirUnusedExpressionChecker to the default checkers listKT-85354checkPsiTypeConsistency: add psi text attachmentsKT-85479Improve diagnostic messages for upper bound violationsKT-84585Upper bound violated warning for expansion of type alias in LHSKT-84924Native: stdlib-cache.lock used by mulitple processesKT-85244False positive DUPLICATE_BRANCH_CONDITION_IN_WHEN with guard conditionKT-78432No-arg constructor should be generated for regular classes with a value class parameter in case of JvmExposeBoxedKT-85487Investigate why WrapContinuationForTailCallFunctions does not work in Android TestKT-59633K2: Implement running AndroidRunner tests with FIRKT-85392Native: concurrency issues in per-file cachesKT-76237Store File-level annotations in KLIB metadata separatelyKT-85162Introduce diagnostics to refine numeric types castingKT-80060False positive REDUNDANT_CALL_OF_CONVERSION_METHOD in case of overloadsKT-85289False-positive smartcast from == with type parameter based variableKT-83890return-value-checker: false positive "Unused return value of 'context'" on kotlin.context() functionsKT-84106False negative "NON_EXHAUSTIVE_WHEN": "NoWhenBranchMatchedException" at runtime with sealed and platform typeKT-85005Considerall:target in the checker of repeatable annotationsKT-85210Enabling -XXLanguage:+IntrinsicConstEvaluation breaks highlighting on some broken codeKT-85217Rework implementation supporting simple-to-suspend function conversionKT-85036Introduce a proper handling of optional expectation annotations in platform checkers during metadata compilationKT-85086False-negative JVM_EXPOSE_BOXED_CANNOT_BE_THE_SAMEKT-84082[OPT_IN_USAGE_ERROR] duplicates for destructuring declarationKT-84732Collection literals: "ExpectedFirCollectionLiteralImplto be resolved" in RHS of equality operatorKT-84841Collection literals: Drop special treatment ofwhenwith expected typeKT-85007Properly implement special rules forkotlin.Resultin@JvmExposeBoxedsupportKT-74383Support new callable reference nodes in JVM backendKT-84828Cleanup JVM backend from the old callable references-related codeKT-85006Refine error messages forINAPPLICABLE_ALL_TARGETdiagnosticKT-84296Support Companion Blocks in CFGKT-85058Remove final field modification in DescriptorRendererOptionsImpl to prevent warnings on JDK 26+KT-85021False positive SUBCLASS_CANT_CALL_COMPANION_PROTECTED_NON_STATIC error in multi-module projectKT-84727[K/N] Segfault when returning null as generic Int typ...
Kotlin 2.3.21
Changelog
Backend. Wasm
KT-84610[Wasm] Failed to compile klibs in IC mode
Compiler
KT-84566Prevent launching Default dispatcher threads from IJ SDK in kotlin compilerKT-85358Native: roll back the workaround for KT-84678 once MapLibre has been properly fixedKT-85626@JvmRecordin commonMain breaks compileCommonMainKotlinMetadata with "Cannot access 'java.lang.Record'"KT-85405Postpone/RevertDontIgnoreUpperBoundViolatedOnImplicitArgumentsKT-84678K/N: Undefined symbol from SPM-added ObjC frameworks when linking iOS targetKT-85021False positive SUBCLASS_CANT_CALL_COMPANION_PROTECTED_NON_STATIC error in multi-module project
JavaScript
KT-82395Support top-level declarations from compiler plugins in JS incremental compilationKT-84475K/JS: false-positive exportability warnings in multi-module projectKT-84633Kotlin/JS: "Serializer for class not found" error when IR output granularity iswhole-programKT-85047Kotlin/JS:@JsStaticon suspend fun of class companion generates incorrect d.tsKT-84517K/JS: bad mappings data in outputted Kotlin stdlib source map
Libraries
KT-71848Kotlinx.metadata: AddCompilerPluginDatainto Km API
Native. C and ObjC Import
KT-85399Kotlin/Native: TypeCastException when casting ObjC Protocol MetaClass with genericSafeCasts enabledKT-85508K/N: TypeCastException when using nw_parameters_create_secure_tcp block parameter on 2.3.20
Tools. Gradle
KT-84729Update Gradle plugin-publish version to enable configuration cache badge on Gradle plugins portal
Tools. Gradle. Compiler plugins
KT-85257AGP/Compose: MergeMappingFileTask clears R8 artifacts due to@OutputDirectoryannotation on AGP 9.1+
Tools. Scripts
KT-85105Scripts: JVM backend internal error (IR lowering) when scratch file contains anonymous objectKT-85103Exception while generating code when explain destructuring declsKT-84842scriptCompilationClasspathFromContext behavior changed from 2.3.10 to 2.3.20KT-85029Kotlin Scripting: ScriptDiagnostic reports "at null" instead of error location
Tools. Statistics (FUS)
KT-85628KGP: composite build FUS metrics fail on access of 'configurationTimeMetrics'
Kotlin 2.3.21-RC2
Changelog
Compiler
KT-85626@JvmRecordin commonMain breaks compileCommonMainKotlinMetadata with "Cannot access 'java.lang.Record'"
Native. C and ObjC Import
KT-85508K/N: TypeCastException when using nw_parameters_create_secure_tcp block parameter on 2.3.20
Tools. Scripts
KT-85105Scripts: JVM backend internal error (IR lowering) when scratch file contains anonymous objectKT-85103Exception while generating code when explain destructuring decls
Tools. Statistics (FUS)
KT-85628KGP: composite build FUS metrics fail on access of 'configurationTimeMetrics'
Kotlin 2.3.21-RC
Changelog
Backend. Wasm
KT-84610[Wasm] Failed to compile klibs in IC mode
Compiler
KT-84678K/N: Undefined symbol from SPM-added ObjC frameworks when linking iOS targetKT-84566Prevent launching Default dispatcher threads from IJ SDK in kotlin compilerKT-85021False positive SUBCLASS_CANT_CALL_COMPANION_PROTECTED_NON_STATIC error in multi-module project
JavaScript
KT-82395Support top-level declarations from compiler plugins in JS incremental compilationKT-84633Kotlin/JS: "Serializer for class not found" error when IR output granularity iswhole-programKT-85047Kotlin/JS:@JsStaticon suspend fun of class companion generates incorrect d.tsKT-84517K/JS: bad mappings data in outputted Kotlin stdlib source map
Libraries
KT-71848Kotlinx.metadata: AddCompilerPluginDatainto Km API
Tools. Gradle
KT-84729Update Gradle plugin-publish version to enable configuration cache badge on Gradle plugins portal
Tools. Gradle. Compiler plugins
KT-85257AGP/Compose: MergeMappingFileTask clears R8 artifacts due to@OutputDirectoryannotation on AGP 9.1+
Tools. Scripts
Kotlin 2.4.0-Beta1
Changelog
Analysis API
KT-83867OVERLOAD_RESOLUTION_AMBIGUITY false positive with assertEquals in IJ repoKT-83723[Analysis API] Enable experimental KDoc resolver by defaultKT-83388Analysis API: properly support KMP in KotlinPackageProvider
Analysis API. Code Compilation
KT-78946Evaluation of variable with local class in type parameter leads to InventNamesForLocalClasses exception
Analysis API. FIR
KT-84711K2 IDE sometimes loses FIR plugin-generated declarations after file changesKT-84596Improve K2 Jooq completion performanceKT-84525KaValueParameterSymbol#getHasSynthesizedName returns false for FirDeclarationOrigin.SubstitutionOverride.DeclarationSiteKT-68260K2 AA: InvalidFirElementTypeException “For CALLABLE_REFERENCE_EXPRESSION with text::lam1, unexpected element of type: no element found” with illegal callable reference callKT-83546Kotlin analysis reach ClsCustomNavigationPolicyKT-84259Move CommonDefaultImportsProvider to the frontend independent moduleKT-82945Analysis API: KotlinIllegalArgumentExceptionWithAttachments: Expected FirResolvedTypeRef with ConeKotlinType but was FirUserTypeRefImplKT-71135AA: exception from sealed inheritors checker whenanalyzeCopy
Analysis API. Infrastructure
KT-84776The test data manager misses the redundancy check in the update modeKT-84962The test data manager misses -ea flagKT-84388Preserve the EOF status in the test data manager to avoid extra changesKT-83905Analysis API: Improve UX with test dataKT-84362Analysis API tests produce many warnings due to "not yet loaded registry"KT-84279Test Data Manager fails on a clean buildKT-83913Exclude compiler-based Analysis API tests from Git trackingKT-80379Extract per-module test generators for AA testsKT-84120Move CLI modules out of kotlin-compiler-fe10-for-ideKT-83200Track external dependencies of the Analysis API modules
Analysis API. Light Classes
KT-82434Light classes should prefer enum entries to propertiesKT-84200SLC: return type is not boxed for delegated methods with generic original methodKT-72451"CCE: class PsiPrimitiveType cannot be cast to class PsiClassType" with same-named enum class and typealias
Analysis API. PSI
Analysis API. Providers and Caches
KT-82731Analysis API: Limit granular tree change processing to a few filesKT-79234Analysis API: Usage ofasMap()on Caffeine caches bypasses stats countersKT-74090Analysis API: Support dumb mode (restricted analysis)
Analysis API. Standalone
KT-83801Nested typealiases are not correctly indexed in standalone mode
Analysis API. Surface
New Features
Fixes
KT-84397KtDefaultAnnotationArgumentReference should return only results with value nameKT-84804buildSubstitutor does not work correctly with Java type parametersKT-84389Cover references with ABI and documentation checksKT-57042K2, Analysis API: KaJavaInteroperabilityComponent#callableSymbol returns null for a Java getter implementing Kotlin propertyKT-80856Analysis API:analysisContextModuleincorrectly determines the module of an original file when used for dangling file context assignmentKT-84363AA, isUsedAsExpression: Unhandled Non-KtExpression parent of KtExpression: class org.jetbrains.kotlin.psi.KtContractEffectKT-70476Analysis API: "KtDefaultAnnotationArgumentReference.resolveToSymbols" does not work in FIR implementationKT-68499Split KtDefaultAnnotationArgumentReference on K1 and K2 implementationKT-70521Analysis API: Impossible to distinguish between 'iterator' operator calls dispatched with imports from objectsKT-77669Context arguments are missed on implicit invoke callsKT-77670resolveToCall: extensionReceiver is incorrectly chosed due to a conflict with context parameters for an implicitinvokecallKT-68633K2 AA: IAE "Expected class KaClassSymbol instead of class KaFirEnumEntrySymbol" with enum entry initializerKT-79186KtCompletionExtensionCandidateChecker does not work for extensions when using callable references of a typeKT-83777Analysis API: The resolution scope of a context module accepts elements from associated dangling filesKT-82571No expected type for overridden property without explicit typeKT-83759Analysis API: Mark platform interface APIs with@KaPlatformInterfaceKT-83223Support "Explicit context arguments" in the Analysis APIKT-65186K2: Analysis API: KtExpressionTypeProvider.getExpectedType works incorrectly for the right hand side of assignment expressionsKT-76011KaFirNamedClassSymbol#companionObjectdoesn't provide generated objects generated by compiled pluginsKT-73290Analysis API: Improve the architecture of content scopes and resolution scopes
Backend. Native. Debug
KT-83804Native: debug information generator converts relative paths to absolute ones
Backend. Wasm
KT-83162K/Wasm: renaming temporary and synthetic variables in the Chrome debuggerKT-85008Develop and publish a demo app using an early version of the component model supportKT-65030K/Wasm: memory allocator for Component Model ABIKT-83607WasmJS: Production build eliminates 'else if' branch when 'else' is not wrapped with curly bracesKT-83728[Wasm] Invalid Ir type while suspend call with blocked if null comprehansionKT-82803Kotlin/WASM: Failed to compile the doResume function with if inside catch blockKT-83800[Wasm] Closed world per-module compilation
Compiler
New Features
KT-84319Add JVM target bytecode version 26KT-83165Collection literals: treat Deprecated(HIDDEN) operatorsofreasonablyKT-84487"-Xcollection-literals" compiler flagKT-84072Collection literals: treat visibility ofofduring resolve correctlyKT-80500Collection literals: AnalyzeConeCollectionLiteralAtomin cases their expected type is not fully knownKT-80491Implement fallback mechanism for collection literalsKT-80490Implement overload resolution mechanism for collection literalsKT-84484Companion Extensions Analysis & ResolutionKT-84199Imple...