Releases: JetBrains/kotlin
Releases Β· JetBrains/kotlin
Kotlin 2.2.0-RC2
Changelog
Backend. Wasm
KT-77622
K/Wasm: investigate CMP crash on mobile Safari
Compiler
KT-77220
Annotation with EXPRESSION is not allowed on lambdas in Kotlin 2.2.0
Compose compiler
b/420729503
Avoid copying@Deprecated
annotations on Compose compiler stubsb/417412949
Emit fake line number forskipToGroupEnd
branch
IR. Tree
KT-77508
K/JS and K/Native CompilationException Wrong number of parameters in wrapper
JVM. Reflection
KT-77663
Reflection: java.util.ServiceConfigurationError: "module kotlin.reflect does not declareuses
" when using kotlin-reflect in modular mode
Tools. CLI
KT-77445
UNRESOLVED_REFERENCE when importing classes from kotlin-stdlib
Tools. Gradle. Multiplatform
KT-77404
The kotlin-stdlib and annotations are missing from commonTest dependencies with 2.2.0-Beta1
Kotlin 2.2.0-RC
Changelog
Compiler
Fixes
KT-77259
Confusing message forANNOTATION_WILL_BE_APPLIED_ALSO_TO_PROPERTY_OR_FIELD
KT-77219
"@Composable
annotation is not applicable" on vararg@Composable
() -> Unit in Kotlin 2.2.0KT-77397
Report UNSUPPORTED_CONTEXTUAL_DECLARATION_CALL when calling declaration with contextual function type in signatureKT-74470
NSME on calling in runtime internal constructor of value class with default arg from testsKT-77137
K2: Controversial behavior allows resolving annotation arguments on a companion inside itKT-77150
Native: compilation fails with an assertion errorKT-76357
K2: a nested class annotation observes member declarations of the outer classKT-77283
Binary compatibility of FirDeclarationCheckerKT-75457
Native: cache machinery uses stdlib cache with default runtime options even if custom runtime options are supplied when partial linkage is disabledKT-76898
K2: ClassCastException when data class shadows supertype'scomponentX
method with wrong typeKT-77078
K2: anonymous object is wrongly allowed to implement interfaces by unsafe DelegationKT-77001
Leave ForbidParenthesizedLhsInAssignments as a warning
Compose compiler
CMP-7873
Native build fails with "e: Compilation failed: Exception during generating code for following declaration"b/412584977
Fix false positive for overriding open functions from older dependencies
JavaScript
KT-77418
KJS: cannot debug with whole-program granularityKT-77271
KJS / Serialization: "Cannot set property message of Error which has only a getter"KT-69591
KJS / d.ts: Wrong type of SerializerFactory for abstract classesKT-42305
KJS / IR: "Class constructor is marked as private"@JsExport
produces wrong TS code for sealed classesKT-52563
KJS / IR: Invalid TypeScript generated for class extending base class with private constructor
Native
KT-76992
Native: update llvm for windows targets
Native. Build Infrastructure
KT-77349
Kotlin/Native: default cache for stdlib is unused
Tools. Gradle
KT-76138
Compile against Gradle API 8.14KT-76139
Run integration tests against Gradle 8.14KT-76137
Compatibility with Gradle 8.14 releaseKT-76797
KGP: StdlibDependencyManagementKt.configureStdlibVersionAlignment() triggering eager configuration realizationKT-77288
Using 'KotlinJvmOptions' is an error - Gradle sync issue when using 2.2.0-Beta2 with Android Gradle PluginKT-77035
A compiler diagnostic isn't reported when its severity is set to warning with GradleKT-73142
Kotlin Gradle plugin: Remove usage of Gradle's internal ExecHandleBuilderKT-75823
Resources bundle with XCFrameworks for iOS
Tools. Gradle. JS
KT-77119
KJS: Gradle: Setting custom environment variables in KotlinJsTest tasks no longer works
Tools. Gradle. Native
KT-77067
Kotlin Gradle plugin with the configuration cache passes all platform libraries to the compiler when compiling a binary for the first time
Tools. Wasm
KT-76948
Wasm: Rename kotlinBinaryenSetup and kotlinD8Setup
Kotlin 2.1.21
Changelog
Backend. Native. Debug
KT-75991
Xcode 16.3: Fix lldb stepping test over an inline function
Compiler
KT-75992
Xcode 16.3: stacktraces on simulators are not symbolicatedKT-76663
KJS: KotlinNothingValueException caused by expression return since 2.1.20KT-75756
Backend Internal error: Exception during IR lowering when trying to access variable from providedProperties in class within kotlin custom scriptKT-76209
CONFLICTING_UPPER_BOUNDS onNothing
boundKT-70352
K2: False-negative CONFLICTING_UPPER_BOUNDS onNothing
boundKT-74739
Native: "IllegalArgumentException: All constructors should've been lowered: FUNCTION_REFERENCE"KT-75483
Native: redundant unboxing generated with smart castKT-71425
IR Inliner: investigate return type of an inlined block
Native
KT-76252
Native: executable crash with generic value classes with 2.1.20
Native. C and ObjC Import
KT-75781
Xcode 16.3: Fix cinterop tests failing with fatal error: could not build module '_stdint'
Native. Runtime. Memory
KT-74280
Native: GC.collect crashes with -Xallocator=std
Tools. CLI
KT-75588
[2.1.20-RC] "was compiled by a pre-release version of Kotlin and cannot be loaded by this version of the compiler" warnings despite using the same compiler versionKT-74663
kotlinc-js CLI: not providing -ir-output-dir results in NullPointerException
Tools. Compiler Plugins
KT-76162
"IllegalStateException: No mapping for symbol: VALUE_PARAMETER INSTANCE_RECEIVER" after updating to 2.1.20
Tools. Gradle
KT-73682
Compatibility with Gradle 8.12 releaseKT-73142
Kotlin Gradle plugin: Remove usage of Gradle's internal ExecHandleBuilderKT-36004
Update 'org.gradle.usage' attribute rules to support the 'JAVA_API' and 'JAVA_RUNTIME' valueKT-73968
KotlinDependencyManagement tries to mutate configuration after it was resolvedKT-73684
Run integration tests against Gradle 8.12KT-72694
Accessing Task.project during execution is being deprecated in Gradle 8.12KT-73683
Compile against Gradle API 8.12
Tools. Gradle. JS
KT-77119
KJS: Gradle: Setting custom environment variables in KotlinJsTest tasks no longer worksKT-74735
KGP uses Gradle internalCompositeProjectComponentArtifactMetadata
KT-71879
Notice of upcoming deprecation for Boolean 'is-' properties in Gradle Groovy scripts
Tools. Gradle. Multiplatform
KT-75808
KGP: MPP with jvm target and Gradle java-test-fixtures is brokenKT-75605
Dependency resolution fails in commonTest/nativeTest source sets for KMP module when depending on another project due to missing PSMKT-75512
Maven-publish: ArtifactId is not correct inpom
file with customizedwithXml
Tools. Incremental Compile
KT-62555
Wrong ABI fingerprint for inline function containing a lambdaKT-75883
Follow-up: switch from INSTANCE heuristic to outerClass chain
Tools. Kapt
KT-75936
K2 KAPT: unsupported FIR element kinds in constant evaluationKT-75942
K2 KAPT: underscore not allowed here
Tools. Scripts
KT-76424
Dependencies in main.kts not working with 2.1.20KT-76296
Kotlin script compiler crashes when secondary constructor calls a functionKT-75589
Scripts: "IndexOutOfBoundsException in jdk.internal.util.Preconditions.outOfBounds" when trying to extend a class which uses global variable
Tools. Wasm
KT-76161
Wasm: "export startUnitTests was not found" after updating to Kotlin 2.1.20
Kotlin 2.1.21-RC2
Changelog
Tools. Gradle. JS
KT-77119
KJS: Gradle: Setting custom environment variables in KotlinJsTest tasks no longer works
Kotlin 2.2.0-Beta2
Changelog
Analysis API
KT-73337
Migrate analysis sources to new IR parameter APIKT-68393
Analysis API: RenameKaClassLikeSymbol. classIdIfNonLocal
toclassId
KT-62924
Analysis API: rename KtCallableSymbol.callableIdIfNonLocal -> callableIdKT-63718
Analysis API: Stub-based dependency symbol providers of library source sessions compute the wrong package name sets
Analysis API. FIR
Fixes
KT-76540
K2: Missing library dependency on Android SDK from androidx.activity-1.8.2 causes LiveEdit failuresKT-73266
K2. "Declaration should have non-local container" with unclosed annotation on top-level functionKT-76432
JavaClassUseSiteMemberScope: Expected FirResolvedTypeRef with ConeKotlinType but was FirUserTypeRefImplKT-76217
K2 AA: "No fir element was found for KtParameter" with multiple context parameter listsKT-76366
ContextCollector: annotations on class members don't have the class as implicit receiverKT-76352
ContextCollector: wrong class annotation context in BODY modeKT-76341
ContextCollector: support dangling modifiersKT-76332
"Declaration should have non-local container" for declaration inside file annotationKT-76331
Cleanup FileStructureElement for classesKT-76115
DisableFirElementBuilder#getFirForElementInsideAnnotations
optimization for files, classes and scriptsKT-76347
ContextCollector: avoid resolution for enum entry annotationsKT-76272
Cleanup AbstractFileStructureTestKT-75542
K2 AA: "FirDeclaration was not found for class KtNamedFunction, fir is class FirErrorExpressionImpl" for unclosed annotation on member functionKT-73117
K2 AA: Exception "Setter is not found" when val has a setter without bodyKT-73719
K2. "FirDeclaration was not found for class KtDestructuringDeclaration, fir is class FirBlockImpl" on incorrect chain call
Analysis API. Providers and Caches
KT-74541
Analysis API: Include files generated by resolve extensions inKaModule
content scopesKT-64236
Analysis API: Introduce a separate module for fallback dependencies of library source modulesKT-63780
Analysis API: Invalidate resolvable library sessions when binary library modules are modified
Analysis API. Stubs and Decompilation
KT-71787
PsiRawFirBuilder.Visitor#visitStringTemplateExpression
forces AST loading
Analysis API. Surface
KT-76018
K2: Stop the wold leads to deadlock/freezeKT-73669
Support psi-based symbol pointer for implicit primary constructorsKT-76011
KaFirNamedClassSymbol#companionObject
doesn't provide generated objects generated by compiled pluginsKT-76008
Provide PSI-based implementation forKaFirNamedClassSymbol#companionObject
Backend. Native. Debug
KT-75991
Xcode 16.3: Fix lldb stepping test over an inline function
Backend. Wasm
KT-76747
[Wasm] Wasm name section absent for wasm structsKT-76701
K/Wasm: custom formatters are not loaded when a project is built with incremental compilationKT-66081
K/WASM:0/0
,5/0
and5%0
throw not ArithmeticException, but RuntimeErrorKT-76287
[Wasm] Enable stdlib and kotlin.test tests after compiler bootstrapKT-75871
[Wasm] Implement new RTTI approachKT-75872
Wasm / IC: IllegalStateException: IC internal error: can not find libraryKT-73362
Migrate K/Wasm sources to new IR parameter API
Compiler
New Features
KT-70722
Implement better Kotlin warnings for value classes and JEP 390 (Warnings for Value-Based Classes)KT-57919
Store all annotations in Kotlin metadata on JVM under a flagKT-54205
Support jakarta Nullability annotations
Performance Improvements
KT-76422
FirJavaFacade#createFirJavaClass: do not compute super type references right away
Fixes
KT-75828
Store backing field/delegate annotations and extension receiver annotations in metadataKT-76663
KJS: KotlinNothingValueException caused by expression return since 2.1.20KT-76615
K2: "IllegalArgumentException: Inline class types should have the same representation: Lkotlin/UByte; != B" for mixed Java/Kotlin codeKT-76805
Wrong NPE occurs when assigning synthetic properties with platform types in Kotlin 2.1.20KT-76253
K2 Compiler: Less precise diagnostic COMPONENT_FUNCTION_AMBIGUITY for flexible typeKT-76583
CCE: suspend lambda attempts to unbox value class parameter twice after lambda suspendedKT-59526
Store annotation default values in metadata on JVMKT-63850
K2: setter with an annotated parameter hasisNotDefault == false
flag in metadataKT-75712
-Wextra: false positive UNUSED_LAMBDA_EXPRESSION on functional type variable assignment with inferred typeKT-69624
Debugger: Missing local variable in Variables view (inline function)KT-75992
Xcode 16.3: stacktraces on simulators are not symbolicatedKT-76199
Introduce -Xcontext-sensitive-resolution compiler flagKT-75553
MISSING_DEPENDENCY_SUPERCLASS
andMISSING_DEPENDENCY_SUPERCLASS_WARNING
is reported at the same time on the same elementKT-76159
Obsolete error "'@JvmDefaultWithCompatibility
' annotation is only allowed on interfaces" should be removedKT-76660
False negative RETURN_NOT_ALLOWED in lambda in default argument leads to NoClassDefFoundError:$$$$$NON_LOCAL_RETURN$$$$$
KT-76301
Fail to infer types after syntactical changeKT-74999
K2: KotlinNothingValueException within Extension FunctionKT-76675
KIAEWA exception at KaFirDataFlowProvider with non-local return from nested inline callKT-75756
Backend Internal error: Exception during IR lowering when trying to access variable from providedProperties in class within kotlin custom scriptKT-76171
"KotlinIllegalArgumentExceptionWithAttachments: Expected expression 'FirSingleExpressionBlock' to be resolved"KT-76345
Enhance variable fixationKT-76578
[FIR, K1/K2 Regression]lateinit
is allowed on loop parametersKT-76448
FirOverrideChecker: class ClsMethodImpl is not a subtype of class KtNamedDeclaration for factory VIRTUAL_MEMBER_HIDDENKT-73360
Migrate K/JVM sources to new IR parameter APIKT-76606
Enable 'Indy: Allow lambdas with annotations' by defaultKT-74852
Kotlin/Native: allow caches for thread state checker and sanitizersKT-76130
IR evaluator does not support array literals in annotation parameter default valuesKT-76436
Missing K2 checker: non-local return through lambda passed to inline f/oKT-74326
False negative: no variable must be initialized ...
Kotlin 2.1.21-RC
Changelog
Backend. Native. Debug
KT-75991
Xcode 16.3: Fix lldb stepping test over an inline function
Compiler
KT-75992
Xcode 16.3: stacktraces on simulators are not symbolicatedKT-76663
KJS: KotlinNothingValueException caused by expression return since 2.1.20KT-75756
Backend Internal error: Exception during IR lowering when trying to access variable from providedProperties in class within kotlin custom scriptKT-76209
CONFLICTING_UPPER_BOUNDS onNothing
boundKT-70352
K2: False-negative CONFLICTING_UPPER_BOUNDS onNothing
boundKT-74739
Native: "IllegalArgumentException: All constructors should've been lowered: FUNCTION_REFERENCE"KT-75483
Native: redundant unboxing generated with smart castKT-71425
IR Inliner: investigate return type of an inlined block
Compose compiler
b/408013789
Add missing return for the default function wrappersb/405541364
Realize coalescable children in the body ofkey
callb/401484249
Generate a group aroundArray
constructor callb/400380396
Fix missingendMovableGroup
call with early return inkey
function
Native
KT-76252
Native: executable crash with generic value classes with 2.1.20
Native. C and ObjC Import
KT-75781
Xcode 16.3: Fix cinterop tests failing with fatal error: could not build module '_stdint'
Native. Runtime. Memory
KT-74280
Native: GC.collect crashes with -Xallocator=std
Tools. CLI
KT-74663
kotlinc-js CLI: not providing -ir-output-dir results in NullPointerException
Tools. Compiler Plugins
KT-76162
"IllegalStateException: No mapping for symbol: VALUE_PARAMETER INSTANCE_RECEIVER" after updating to 2.1.20
Tools. Gradle
KT-73142
Kotlin Gradle plugin: Remove usage of Gradle's internal ExecHandleBuilderKT-73684
Run integration tests against Gradle 8.12KT-74889
Compile against Gradle 8.13 APIKT-74887
Compatibility with Gradle 8.13 releaseKT-36004
Update 'org.gradle.usage' attribute rules to support the 'JAVA_API' and 'JAVA_RUNTIME' valueKT-72694
Accessing Task.project during execution is being deprecated in Gradle 8.12KT-74890
Run Gradle integrations test against Gradle 8.13 releaseKT-73682
Compatibility with Gradle 8.12 releaseKT-73968
KotlinDependencyManagement tries to mutate configuration after it was resolvedKT-73683
Compile against Gradle API 8.12
Tools. Gradle. JS
KT-74735
KGP uses Gradle internalCompositeProjectComponentArtifactMetadata
KT-71879
Notice of upcoming deprecation for Boolean 'is-' properties in Gradle Groovy scripts
Tools. Gradle. Multiplatform
KT-75808
KGP: MPP with jvm target and Gradle java-test-fixtures is brokenKT-75605
Dependency resolution fails in commonTest/nativeTest source sets for KMP module when depending on another project due to missing PSMKT-75512
Maven-publish: ArtifactId is not correct inpom
file with customizedwithXml
Tools. Incremental Compile
KT-62555
Wrong ABI fingerprint for inline function containing a lambda
Tools. Kapt
KT-75936
K2 KAPT: unsupported FIR element kinds in constant evaluationKT-75942
K2 KAPT: underscore not allowed here
Tools. Scripts
KT-76424
Dependencies in main.kts not working with 2.1.20KT-76296
Kotlin script compiler crashes when secondary constructor calls a functionKT-75589
Scripts: "IndexOutOfBoundsException in jdk.internal.util.Preconditions.outOfBounds" when trying to extend a class which uses global variable
Tools. Wasm
KT-76161
Wasm: "export startUnitTests was not found" after updating to Kotlin 2.1.20
Kotlin 2.2.0-Beta1
Changelog
Analysis API
KT-75880
K2 Mode: Typealias reference resolves to the underlying class in KMP projectKT-74246
KaVisibilityChecker.isVisible is inefficient with multiple calls on the same use-siteKT-57733
Analysis API: Use optimizedModuleWithDependenciesScope
s in combined symbol providers
Analysis API. Code Compilation
KT-75502
K2: IDEA hangs when evaluating inside kotlin-stdlib modules in the Kotlin projectKT-73077
Evaluation of inline functions is broken inside Kotlin project and Amper module in Idea sourcesKT-73936
K2: CyclicInlineDependencyException: Inline functions have a cyclic dependency in evaluatorKT-74582
InterpreterMethodNotFoundError when trying to evaluate simple expressions after recent fixesKT-74524
Compilation exception with incorrect JvmName annotation argumentsKT-74443
Compilation peer collector ignores inline property accessors
Analysis API. FIR
Performance Improvements
KT-75790
Experiment with increasing DEFAULT_LOCKING_INTERVAL timeKT-72159
LLFirCompilerRequiredAnnotationsTargetResolver: consider rewriting it to use honest jumping locks
Fixes
KT-72908
K2 Analysis API: "FirDeclaration was not found for class org.jetbrains.kotlin.psi.KtFunctionLiteral" with non-local destructuring declaration without initializer beforeinit
blockKT-75532
ContextCollector: scope for an anonymous function type parameter contains regular parametersKT-74508
FirElementBuilder#findElementInside
should reuse logic fromKtToFirMapping#getFir
KT-73066
[LL] Enable low-level-api-fir-native even with the disabled native partKT-75132
Investigate failures of sandbox diagnostic testKT-75130
Set up LL FIR tests for sandbox test dataKT-73386
Standardize LL FIR test for compiler test dataKT-75125
ISE βValue classes cannot have 0 fieldsβ on instantiating inline class without fieldsKT-75179
ContextCollector: support error propertiesKT-74632
K2: ISE FirLazyDelegatedConstructorCall should be calculated before accessingKT-73493
Support context parametersKT-73183
Support context parameters in ContextCollectorVisitorKT-60350
K2 IDE: top level destructuring RHS should be resolvableKT-74794
K2: FirLazyExpression should be calculated before accessing with context parameter and implicit return typeKT-72938
Get rid of KaFirAnnotationListForReceiverParameterKT-73727
Exception in implicit type resolution
Analysis API. Infrastructure
KT-74917
[Analysis API, Test Framework] Introduce a way to acquirePsiFile
for a givenTestFile
inKtTestModule
Analysis API. Light Classes
KT-75391
Reduce the amount of psi-based logic in light classesKT-70001
SLC adds@Override
with zero text offset onoverride
memberKT-75755
K2. False positive red code on vararg parameters in Kotlin class with@JvmOverloads
when called from JavaKT-75397
Constructors and functions with non-last vararg parameters are treated as varargsKT-73405
Get rid of KtElement#{symbolPointer, symbolPointerOfType} API usagesKT-74868
Support context parametersKT-74733
SymbolPsiLiteral.text == value for Java constantKT-74620
Delegated functions with value classes are present in light classesKT-74595
Static functions with value classes are present in light classesKT-74284
Synthetic data class methods using value class types present in LC
Analysis API. Providers and Caches
KT-74090
Analysis API: Support dumb mode (restricted analysis)KT-74943
Analysis API: ReplaceKotlinGlobalModificationService
with simpler global modification event publishing and listener-based modification trackersKT-70518
K2: Analysis API: Access indices outside ofConcurrentMap
computation in symbol providersKT-62115
Analysis API: Package providers are not cached per search scopeKT-74302
Analysis API:LLFirProvider
should disregard self-declarations ingetFirClassifierBy*
KT-74463
Analysis API:LLNativeForwardDeclarationsSymbolProvider
queries its cache even when theClassId
cannot represent a native forward declarationKT-67868
Analysis API: Improve the architecture ofLLFirKotlinSymbolProvider
s
Analysis API. Standalone
KT-72810
withMultiplatformLightClassSupport is inconvenient in Standalone
Analysis API. Stubs and Decompilation
KT-68484
K2 IDE, Analysis API: "We should be able to find a symbol for function" for getting KaType ofIterable<T>.map(transform: (T) -> R)
parameter in J2K
Analysis API. Surface
New Features
Performance Improvements
KT-70165
Introduce PSI-basedKaSymbol
s for K2
Fixes
KT-72482
"KotlinIllegalArgumentExceptionWithAttachments: Expected all candidates to have same callableId but some of them but was different" on trying to add the importKT-75894
Cannot build KaFirJavaFieldSymbol for FirFieldImplKT-75586
KaFirPropertyGetterSymbol#isInline
andKaFirPropertySetterSymbol#isInline
is incorrect for accessors with explicit modifierKT-58572
Analysis API: Enforcing STATUS resolve in 'KtFirNamedClassOrObjectSymbol.visibility' may cause lazy resolve contract violationKT-72730
K2: "Unexpected owner function: KtNamedFunction" on vararg val parameter in functionKT-75574
Recognize injected code fragment copiesKT-75573
Recognize physical file copies as dangling filesKT-74801
Analysis API: Publish/subscribe to modification events with a single message bus topicKT-73290
Analysis API: Improve the architecture of content scopes and resolution scopesKT-68901
Constructor delegation call receiver missing in fir implementationKT-75115
Analysis API: TheJavaModuleResolver
compiler class is leaked to Analysis API platform implementationsKT-75123
K2. KaFirNamedFunctionSymbol should contain a receiverKT-72639
Support context parameter APIKT-73112
AA: FirExpression.toKtReceiverValue should handle context receivers properlyKT-74905
Cannot find context receiver in FIR declarationKT-74563
createPointer
is overloaded not for all implementationsKT-73722
Analysis API: Automatically check that the API surface is fully documentedKT-65065
ProvideKtTypeReference#getShortTypeText()
Backend. Wasm
KT-59032
Support instantiation of annotation cl...
Kotlin 2.1.20
Changelog
Analysis API
Fixes
KT-68198
Analysis API: Support application service registration in plugin XMLsKT-57733
Analysis API: Use optimizedModuleWithDependenciesScope
s in combined symbol providersKT-73156
AA: type retrieval for erroneous typealias crashesKT-71907
K2 debugger evaluator failed when cannot resolve unrelated annotationKT-69128
K2 IDE: "Unresolved reference in KDoc" reports existing Java class in reference to its own nested classKT-71613
KaFirPsiJavaTypeParameterSymbol cannot be cast to KaFirTypeParameterSymbolKT-71741
K2 IDE. Classifier was found in KtFile but was not found in FirFile inlibraries/tools/kotlin-gradle-plugin-integration-tests/build.gradle.kts
inkotlin.git
and broken analysisKT-71942
Need to rethrow Intellij Platform exceptions, like ProcessCanceledExceptionKT-70949
Analysis API: "containingDeclaration" does not work on nested Java classes in K2 implementationKT-69736
K2 IDE: False positive resolution from KDoc forvalue
KT-69047
Analysis API: Unresolved KDoc reference to extensions with the same nameKT-70815
Analysis API: Implement stop-the-world session invalidationKT-69630
KAPT User project builds with KAPT4 enabled fail with Metaspace overflow
Analysis API. Code Compilation
KT-71263
K2 evaluator: Error in evaluating self property with extension receiver
Analysis API. FIR
Performance Improvements
KT-72025
FileStructureElement: reduce redundant resolveKT-74012
RedundantFirAbstractBodyResolveTransformerDispatcher.<init>
CPU consumptionKT-73900
ContextCollectorVisitor#computeContext may spend significant time oncreateSnapshot
KT-73665
FirElementFinder is inefficient in large filesKT-73330
Remove bodies from functions without contracts after the CONTRACTS phaseKT-73017
Analysis API:FirReferenceResolveHelper.getSymbolsByResolvedImport
searches for classes even when the selectedFqName
is a known package
Fixes
KT-72308
getOrBuildFir returns null for this expression for plusAssign operatorKT-72660
ISE: Recursive update at org.jetbrains.kotlin.analysis.low.level.api.fir.caches.FirCaffeineCache.getValueKT-74097
ISE: Recursive update at org.jetbrains.kotlin.analysis.low.level.api.fir.caches.FirCaffeineCache.getValueKT-74098
ISE: Recursive update at org.jetbrains.kotlin.analysis.low.level.api.fir.caches.FirCaffeineCache.getValueKT-72148
K2: KISEWA: Expected FirResolvedArgumentList for FirAnnotationCallImpl of FirValueParameterImpl(DataClassMember) but FirArgumentListImpl foundKT-73079
K2: Internal compiler error when conflicting type aliases are presentKT-73456
Expected FirResolvedContractDescription but FirRawContractDescriptionImpl found for FirSimpleFunctionImplKT-73259
Expected FirResolvedContractDescription but FirLegacyRawContractDescriptionImpl found for FirSimpleFunctionImplKT-72740
FirDanglingModifierList:lazyResolveToPhase(STATUS)
cannot be called from a transformer with a phase STATUSKT-66132
K2: FirRegularClass expected, but FirFileImpl found | Containing declaration is not foundKT-72196
K2. KMP. IllegalStateException: expect-actual matching is only possible for code with sourcesKT-72652
FirProvider#getContainingClass
should supportFirDanglingModifierSymbol
KT-73105
Lazy resolve contract violation (BODY_RESOLVE from BODY_RESOLVE)KT-66261
K2: Analysis API: "FirDeclaration was not found for class org.jetbrains.kotlin.psi.KtProperty, fir is null" with MULTIPLE_LABELS_ARE_FORBIDDEN K2 errorKT-72315
K2. KIWA on usage of always-true OR in guard conditionKT-65707
K2 IDE: unresolved calls of callables imported with typealias as qualifierKT-61516
K2: Provide an LL FIR implementation forgetContainingClassSymbol
(inFirHelpers
)KT-72853
Expected FirResolvedArgumentList for FirAnnotationCallImpl of FirContextReceiverImpl(Source) but FirArgumentListImpl foundKT-64215
K2: do not resolve type annotations of receiver if it is used as an implicit return typeKT-64248
K2: do not resolve type annotations of context receiver if it is used as an implicit return typeKT-72821
Add assertion to diagnostic tests to check that all declarations have BODY_RESOLVE phase at the endKT-64056
K2: K2: FirLazyBodiesCalculator shouldn't calculate annotation arguments on type phaseKT-71651
K2 IDE: False positive NON_LOCAL_SUSPENSION_POINT in suspend function callKT-72164
K2. IllegalArgumentException when pre and post increment are used simultaneously in assignmentKT-71174
Illegal scope usedKT-72407
FirImplementationByDelegationWithDifferentGenericSignatureChecker: FirLazyExpression should be calculated before accessingKT-72228
K2: Reformat doesn't work in project with Kotlin2.0.21
KT-69671
TYPES phase contract violation through JavaSymbolProviderKT-71348
K2: KotlinIllegalStateExceptionWithAttachments: 'By now the annotations argument mapping should have been resolved' during code inspectionKT-72024
FirClassVarianceChecker: Expected FirResolvedTypeRef with ConeKotlinType but was FirImplicitTypeRefImplWithoutSourceKT-71746
K2 IDE.ISE: Zero or multiple overrides found for descriptor in FirRegularClassSymbol serializing/ExternalSerializer
and red code on@Serializer
(forClass) ` usage
Analysis API. Infrastructure
KT-72922
KotlinFakeClsStubsCache project leakageKT-71988
Improve scripts test coverage by LL FIRKT-64687
K2: Analysis API: migrate AbstractFirLibraryModuleDeclarationResolveTest to kotlin repo
Analysis API. Light Classes
KT-73492
K2. FP error in Java file when using@JvmSuppressWildcards
annotation without argumentsKT-66763
K2: Get rid of context receivers in Analysis API and LL APIKT-71781
SLC: migrate SLC from KotlinModificationTrackerService to KotlinModificationTrackerFactoryKT-67963
K2: PsiInvalidElementAccessException on redeclaration of class with constructorKT-71407
K2: Do not report@JvmField
default value as PsiField initializer in K2KT-72078
K2 PSI change for constructor parameter with value class type
Analysis API. Providers and Caches
KT-69247
Analysis API: Invalidate sessions after builtins modification eventsKT-72704
ISE: No 'org.jetbrains.kotlin.fir.scopes.impl.FirDelegatedMembersFilter'(53) in array owner: LLFirBuiltinsAndCloneableSession for Builtins for JS/wasm-js (JS)KT-67148
Analysis API: Introduce a weak reference cache for the originalKtSymbol
inKtSymbolPointer
KT-73395
Analysis API:JavaElementPsiSourceWithSmartPointer
contains strong references to PSI- [
KT-72390
](https://youtrack.jetbrains.com/issue/KT-...
Kotlin 2.1.20-RC3
Kotlin 2.1.20-RC2
Changelog
Compiler
KT-75649
K2: NPE on assigning platform type value to non-nullable lateinit varKT-75483
Native: redundant unboxing generated with smart castKT-75526
Regression in K2 scripting: local name doesn't shadow one from the implicit receiverKT-75444
Contradictions in the constraint system are ignored in case of multiple constraints from forking pointsKT-75111
False negative "This declaration needs opt-in" for usage of enum entry with OptIn marker in another moduleKT-74764
Native: merge init nodes generated within the same LLVM module for the same klib
Compose compiler
CMP-7571
1.8.0-alpha03 incompatible with Compose based on k1b/397855145
Fix "Unknown file" error in target annotation inference
JavaScript
KT-75606
KJS: java.lang.AssertionError: Different declarations with the same signatures were detectedKT-72437
KJS. Invalidcopy
method for inherited JSO with type parameters
Klibs
KT-75393
Non-JVM artifacts from Kotlin 2.1.20-RC fail on 2.1.x releases due to IMPLICIT_ARGUMENT
Native
KT-70202
Xcode 16 Linker fails with SIGBUS
Tools. Compiler Plugins
KT-73897
PowerAssert: Implicit argument detection is brittle in a number of cases
Tools. Gradle
KT-73842
Gradle: AGP failing tests with "Failed to calculate the value of property 'generalConfigurationMetrics'" using KGPKT-74394
KGP + isolated projects: "Something has been appended to this collector already"KT-75262
Gradle test-fixtures plugin apply order breaks the projectKT-75277
FUS statistics: 'java.lang.IllegalStateException: The value for this property cannot be changed any further' exception is thrown during project import
Tools. Gradle. JS
KT-75485
KJS: "Module not found: Error: Can't resolve 'style-loader' and 'css-loader'" in 2.1.20-RC