Releases: JetBrains/kotlin
Releases Β· JetBrains/kotlin
Release list
Kotlin 2.4.20-Beta2
Changelog
Analysis API
KT-86546Check suspicious when over ConeKotlinType in ConeTypeCompatibilityCheckerKT-65417K2 IDE: KTOR false positive expect-actual matching error on enum class because of implicit clone() in non-JVM source sets
Analysis API. FIR
KT-69727K2 IDE. Wrong error in the editor on callingclonefunction of actual enum instance in non-jvm platformKT-69726FP errors on declaringfun clone()in actual enum in not-jvm source-set
Analysis API. Infrastructure
KT-84914Do not publish analysis-api-test-frameworkKT-86986kotlin-compiler-common-for-idebundles unrelated Analysis API modules
Analysis API. Light Classes
KT-87301SymbolLightAccessorMethod#isValid returns false for delegated propertiesKT-87171SLC: non-mapped Kotlin collection supertype is dropped from supertype listKT-87250JvmExposeBoxed: light classes shouldn't be autogenerated for private declarations
Analysis API. PSI
KT-84925Move KtReference to the Kotlin IntelliJ plugin
Analysis API. Standalone
KT-61404Analysis API: implement proper library publishing structure
Analysis API. Stubs and Decompilation
KT-86250KotlinIllegalArgumentExceptionWithAttachments: No fir element was found for KtDestructuringDeclaration on destructuring declaration typingKT-64901Inconsistency between AST and Stub tree in the case of non-local destructuring declarations
Analysis API. Surface
Performance Improvements
KT-70021Analysis API: optimize KaFirExpressionTypeProvider.expressionType for simple cases
Fixes
KT-87337Integrate KaContextParameterOwnerSymbol into KaCallableSymbolKT-78234Analysis API: Context parameters for accessorsKT-86786Investigate suspicious when over ConeKotlinType in ConeKotlinType.getDirectSupertypesKT-72902Shouldn'tKaSymbolProvider#findClassreturnKaNamedClassSymbol?KT-87237No expected type insidearrayOfin annotation entriesKT-87143findKDocreturns parent property KDoc for accessors of an overriding propertyKT-83224Support "Compile-time functions" in the Analysis APIKT-87174Expected class KaFirSymbol instead of class KaFirPackageSymbol exceptionKT-87199[Analysis API] RemoveKaEnumEntryInitializerSymbolKT-85206Provide information about potentially removable context-sensitive resolution qualifiers via Analysis APIKT-86872KtOperationReferenceExpressionshould beKtResolvableCallKT-85800Analysis API: The internal utilityPrettyPrinteris used in the public API surfaceKT-73796Consider "KaAnnotation#useSiteTarget" removalKT-84184[Analysis API] Provide a unification substitutor API
Backend. Wasm
KT-86242K/Wasm: deprecate and prohibit usingwasmExportsKT-87639[Wasm] Multimodule wasm fails on Pointer usagesKT-86245K/Wasm: provide an API to get a reference to wasm memoryKT-76207K/Wasm: prototype generating suspend functions with stack-switching proposalKT-73452K/Wasm: turning on range checks by defaultKT-83159K/Wasm: generate one common base class fun interfaces (including Function*)KT-83356K/Wasm: Difference in behavior on nested class initialization (for enums?)KT-84267K/Wasm: init order of companion objects is different from JVMKT-86192K/Wasm: Raise a warning on usage of top-level require in JsFunKT-86822K/Wasm: don't cast the result of calling callable references with Unit return type
Compiler
New Features
KT-85925Native: rework virtual trampolines machineryKT-80373Add initial support for release compiler cachesKT-86018Short-form of name-based destructuring for multi-field value classesKT-86406Swift Export: support supercalls for cross-language inheritanceKT-77616Native: consider adding an annotation that enforces thread state switching for a@SymbolNameexternal fun`KT-86410[KMP] Implement acceptance of JVM IC metadata from previous compilation
Performance Improvements
KT-85621Native: fix optimization in CastsOptimization
Fixes
KT-86525JvmExposeBoxed: Inconsistent number of parameters during reflectionKT-87606Compiler crash on red code with redeclaration of type parameter which is used as expressionKT-87335Context parameters: wrong LINENUMBER emitted for context argument loads in JVM bytecodeKT-87245Report UnsupportedFeature on ExplicitContextArgumentKT-87577Compiler crash on red code with ambiguous type parameter used as expressionKT-72706Confusing "INVISIBLE_REFERENCE" when calling private constructorKT-86957Warning on the underscore variable is not reported for java.lang.Void callKT-87261K/N debug: 'is' check miscompilation β local variable reports wrong type when two smart-cast extractions precede an inline loopKT-87507False-positiveABSTRACT_CLASS_MEMBER_NOT_IMPLEMENTEDon fake-override with value parameter of type missing in dependenciesKT-87439Postpone UnitConversionsOnArbitraryExpressions indefinetelyKT-87434JAVA_CLASS_ON_COMPANION not reported when companion accessed through typealiasKT-64622[K/N]arutility fails with symbol@in module/klib name on Linux with static cacheKT-84037Native: reworkarinvocations in the compilerKT-87339JVM: Support recursive type provided as an argument of typeOfKT-86551Check suspicious when over ConeKotlinType in FirExposedVisibilityDeclarationChecker#findVisibilityExposureKT-87395StackOverflowError in return value checker when a Java class member is annotated with the class's own nested annotationKT-87290Investigate possible bug in value class deserializationKT-61141K/N: irText tests failed with K/N irText first runKT-85764Native: Prohibit compiling sources in 'kotlin' package by defaultKT-86469Check 'when's over 'ConeKotlinType' which could miss some branches in DFAKT-87253MissedConeCapturedTypecheck in processing ofequalscontractsKT-84522Refactor FirResolvedQualifierKT-84299resolvedToCompanionObjectis not set in some situationsKT-87327JVM IR: NullPointerException in JvmInlineClassLowering when using == between value of generic value class and another value classKT-86959Native: OptimizeCasts gets confused by "complex" terms leaking between different loop iterations- [
KT-86949](https://yo...
Kotlin 2.4.10
Changelog
Backend. Wasm
KT-87066K/Wasm: Not all files are presented in compiler output directory with multimodule-closed-world and incremental compilation
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/522127447Compose Compiler 2.4: classes previously inferredstablenow reportedruntime/Uncertain
Klibs
KT-86501Native: IrTypeAliasSymbolImpl is already bound. Signature: kotlinx.datetime/Instant|null[0] on iosSimulatorArm64
Tools. CLI
KT-86930Introducekotlinrin the Kotlin distribution
Tools. Gradle. BCV
KT-87223Gradle, BCV: open version range in kotlinAbiValidationCompatClasspath causes kotlin-build-tools-impl to resolve to 2.4.20-Beta1 instead of 2.4.0
Tools. Gradle. JS
KT-87304jsBrowserTest fails with "exited with errors (exit code: 1)"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.10-RC2
Changelog
Backend. Wasm
KT-87066K/Wasm: Not all files are presented in compiler output directory with multimodule-closed-world and incremental compilation
Tools. Gradle. BCV
KT-87223Gradle, BCV: open version range in kotlinAbiValidationCompatClasspath causes kotlin-build-tools-impl to resolve to 2.4.20-Beta1 instead of 2.4.0
Tools. Gradle. JS
KT-87304jsBrowserTest fails with "exited with errors (exit code: 1)"
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'