Changelog
Analysis. API
Performance Improvements
KT-64987Analysis API: 50GB memory allocation on creating empty kotlinx.collections.immutable.persistentMapOf
Fixes
KT-65268K2: Checking the presence of the delegated constructor call forces AST loadingKT-63330Analysis API: Stub-based deserialized symbol providers provide unresolved enum entry annotation argumentsKT-65418Analysis API:LLFirAbstractSessionFactoryloads anchor module sessions eagerlyKT-64718Analysis API: do not expose SealedClassInheritorsProvider and FirRegularClass to IDE PluginKT-65075K2: getContainingDeclaration() is broken for declarations inside code fragmentsKT-61332SupportKtTypeCodeFragmentinPsiRawFirBuilderKT-65150AA: incorrect result fromKtTypeProvider#getReceiverTypeForDoubleColonExpressionfor Java static methodKT-55750LL FIR: Implement multi-threaded resolveKT-56551LL FIR: implement parallel resolve for jumping phasesKT-65223Psi: avoid KtFile usagesKT-65307Analysis API FE10: support KtFe10AnalysisSessionProvider.getAnalysisSessionByUseSiteKtModuleKT-62695K2 IDE: Unresolved extension functions in KDocKT-65152Analysis API: KDoc references to packages are not fully resolvedKT-64988K2 IDE: Navigation from the named argument in safe call does not workKT-64074K2: Investigate LL divergence for Script.testTopLevelPropertyInitializationKT-64921K2 IDE: references in platform code resolve to expect classifier instead of actualKT-62441K2: IDE K2: "No dangling modifier found"KT-64528K2 IDE: MPP: unregistered component 'org.jetbrains.kotlin.fir.scopes.impl.FirDelegatedMembersFilter'KT-64993Analysis API: KtExpressionTypeProvider.getExpectedType works incorrectly for arguments of safe callsKT-64883Allow direct creation of KtCommonFileKT-64646K2: properly forbid ast loading during raw fir phase in testsKT-64862Psi: missed parenthesis in type reference presentationKT-62893K2 IDE. FP 'when' expression must be exhaustive with Java sealed interface from libraryKT-63795K2:lazyResolveToPhase(BODY_RESOLVE)cannot be called from a transformer with a phase BODY_RESOLVE from SealedClassInheritorsProviderIdeImpl
Analysis. Light Classes
KT-65425K2 IDE: Seeing a reference to the class generated by compiler plugin exposed from Java code caused NPE from light classesKT-64937SLC: internal setters are not mangled
Apple Ecosystem
KT-63212podInstall task fails without a proper diagnostic when xcodeproj gem is outdated
Backend. Wasm
KT-63939Kotlin/Wasm Support lazy associated object initialisationKT-64803K/Wasm: non-capturing lambdas are not singleton unlike same lambdas in jvmKT-64449K2: Implement K1WasmWasiCodegenBoxTestGenerated for K2KT-64829K/Wasm: division remainder has a wrong signKT-65009Generate TypeScript definitions for the@JsExportdeclarations in K/Wasm
Compiler
New Features
KT-63670Implement platform specific declaration clash diagnostics across all backendsKT-62547Introduce a language feature flag for smartcasts based on "memory" variables
Fixes
KT-63344K2: False positive ABSTRACT_CLASS_MEMBER_NOT_IMPLEMENTEDKT-58845K2: SAM checker can run incorrectly in presence of an expect supertypeKT-61843K2: Missing TYPE_MISMATCH for nested array literalsKT-61798K2 incorrectly calculates modality of property accessorsKT-65255K2 / KJS: "IllegalArgumentException: Candidate is not successful, but system has no contradiction"KT-65341K2: "Cannot find cached type parameter by FIR symbol" caused by not-null assertion operator inside string in throwKT-49283Support contribution type info from a nested builder inference callKT-64077K2: Builder inference ignores constraints from nested builder inferenceKT-49160Couldn't infer a type argument through several builder inference calls broken by a local classKT-61310K2: "Not enough information to infer type variable R" for transformLatestKT-63733Builder-style type inference can't resolve to extension overloads when they're more applicable than member onesKT-57707K1: inconsistent TYPE_MISMATCH in builder inferenceKT-55057Builder inference changes behaviour sporadically based on BI annotation on unrelated callKT-60663Builder inference does not work inside a nested unrelated builder inference lambdaKT-53639TYPE_MISMATCH: compiler can't infer the list's type when usingbuildList {}builder orCollection#isNotEmptyKT-60291K2: "IllegalStateException: Cannot serialize error type: ERROR CLASS: Cannot infer argument for type parameter T" during FIR serializationKT-65033K2: Fir2LazyIr: Lazy type aliases not supportedKT-57709Inconsistent extension function call resolution in builder inferenceKT-53740Builder inference with multiple lambdas leads to unsound typeKT-60877Builder inference from the null literal results in Nothing instead of Nothing? for producing positions of the postponed type variableKT-53553Builder inference: inconsistent types in different lambda scopesKT-54400K2: builder inference does not work with assignments of literals to member propertiesKT-53109CompilationErrorException generateUnboundSymbolsAsDependencies with builder inference and lambdasKT-52757Type inference for builders fails if inferred from a functionKT-63840Builder inference fails on calls to identity-shaped functions with postponed type variables inside select-constructionsKT-64276[K/N][K2] K2 behaviorial difference with inconsistent inheritance of ObjCNameKT-59782K2: Forbid local delegated properties with private accessors in public inline functionsKT-65482K2: NoSuchFieldError due to using unboxed typeKT-63208K2: Implement deprecation cycle and fix missing errors for error-level nullable arguments of warning-level Java typesKT-64891K2: consider supporting/forbidding foo.(bar)() syntaxKT-62134K2: handle non-simple types during FirStatusResolver.isPrivateToThis checkKT-65290K2: No override for FUN DEFAULT_PROPERTY_ACCESSORKT-65111K2: Java star imports don't work in KJK interdependenciesKT-59012K2: Support inferring types based on self upper boundsKT-65373K2: there is a crash in KJK hierarchy with an extension member propertyKT-65277IrFakeOverrideBuilder: NPE from IrJavaIncompatibilityRulesOverridabilityCondition.doesJavaOverrideHaveIncompatibleValueParameterKindsKT-62884K2: different signature of delegate object for generic extension propertyKT-59630K2: Implement running FIR Blackbox tests on different JDKsKT-64944Can't assign null after early return smart cast with typed destructive assignmentKT-64910K2: AA FIR: KtCall's argument mapping misses SAM conversion argumentKT-64846K2: false negative CONFLICTING_JVM_DECLARATIONS on inheritance from Java collection subclass with a conflicting overrideKT-60732K2 Scripting: TeamCity DSL testKT-65165K2: "ClassCastException: class java.lang.String cannot be cast to class SampleClass"KT-64982K2: false negative FUNCTION_CALL_EXPECTEDKT-64872K2: do-while condition able to access uninitialized variableKT-65318K2: Substitution stackoverflow on jspecify@NullMarkedsuperclassKT-65010Kotlin/Native: code generation for a static field is failingKT-59921K2: Disappeared NULL_FOR_NONNULL_TYPEKT-57299K2: VerifyError due to overriding final methodsizeon a subclass of Collection and SetKT-57300K2: subclass of MutableCollection with primitive element type has methods with boxed typeKT-58279K2. False-negativeSmart cast to is impossible, because is a public API property declared in different modulefor Java static fieldKT-64706K2: Type inference cannot resolve nullable@ComposablelambdaKT-65058K2: Protected function call from public-API inline function is prohibited in anonymous objectKT-53629K2: forbid multiple labels per statementKT-65316K2: False positive USAGE_IS_NOT_INLINABLE for expression labeled with illegal labelKT-57268K2: extra methodsremoveand/orgetOrDefaultare generated for Map subclasses with JDK 1.6 in dependenciesKT-63151K2: Assignment within function lambda should invalidate contract DFA implicationsKT-63351K2. No smart cast with not-null assertion operator after a safe callKT-65324atomicfu-plugin: top-level delegated properties cause NPEKT-60246K2: origin is not set for getting array element operatorKT-64387K2: Missing POSTFIX_INC/DEC origin for array element inc/decKT-61891K2: POSTFIX_{INCR|DECR} of global misses an originKT-65019K2: unexpected exception when executing inc/dec in finally block on WASMKT-64392Factor out KLIB serialization logic from thebackend.nativemoduleKT-65270K2: Missing ACTUAL_WITHOUT_EXPECT when expect is fake-overrideKT-60367K2: Support EXPECT_AND_ACTUAL_IN_THE_SAME_MODULE diagnosticsKT-62704Absent testrunner FirLightTreeDiagnosticTestSpecGeneratedKT-65044K2 compiler crash on unresolved delegated extention receiverKT-65021K2: Missing error and miscompilation in destructuring declaration delegationKT-63899K2: Vararg parameter misses annotation in metadataKT-60175JVM IR inline: accidental reification of typeOf type argumentKT-60174JVM IR inline: accidental reification in various casesKT-65103K2: IllegalArgumentException: IrErrorCallExpressionImpl(5388, 5392, "Unresolved reference: R?C|/cont|") found but error code is not allowedKT-64635K2: "KotlinIllegalArgumentExceptionWithAttachments: Expected expression 'FirAnonymousFunctionExpressionImpl' to be resolved" when provideDelegate is extension of function with receiverKT-63434K2. False positiveCannot accesswith protected nested classifiers references inside anonymous object inherited from containing classKT-64314K2: Rename FirConstExpression to FirLiteralExpressionKT-63577K2: false-positive "wrong number of type arguments" error on callable reference to member of generic function's local classKT-64975FIR: Deserialize enum entry annotation arguments from binary libraries with lookup tags instead of symbolsKT-61626K2: Module "com.soywiz.korlibs.kmem:kmem" has a reference to symbol korlibs.memory/Buffer|null[1]KT-64268K2: Data-flow from nested lambda not passed to outer lambdaKT-59729K2: Investigate CFG buildings for inner lambdas in case of double-lambda builder inferenceKT-64841K2: argument type mismatch with type parameter with recursive boundKT-62554K2: incorrect "inherits multiple implementations" error when base Java method takes a parameter of primitive wrapper typeKT-65093K2: Super constructor call able to access uninitialized object fieldsKT-56489K2 allows reading uninitialized variable in object declarationKT-59987K2: Disappeared REIFIED_TYPE_FORBIDDEN_SUBSTITUTIONKT-36786Smartcast doesn't work in case of property infix callKT-65056IrFakeOverrideBuilder: ISE "No override for FUN" on package-private Java method in K-J-K hierarchyKT-62045IrFakeOverrideBuilder: incorrectly merged fake overrides for Java methods accepting wrapper Double and primitive doubleKT-57640[K2/N] Investigate behaviour for intersection overrides for properties that have incompatible typesKT-59682K2: Use proper source for vararg argumentsKT-63781K2: Generated blocks appear in the IRKT-63779K2: Regression for locations of 'if' statementsKT-63624K2: incompatible declaration because of different visibilityKT-64400K2: allow to use simple boolean expressions as constantsKT-59972K2: Disappeared EXPRESSION_EXPECTED_PACKAGE_FOUNDKT-63256K2: NOT_IDENTITY operator call is illegal in contract descriptionKT-63529K2: Compiler does not detect tailrec call with nullable typeKT-65012IR Evaluator:NoSuchFieldExceptionwhen evaluating protected/private fields of superclassesKT-64871IrFakeOverrideBuilder: ISE "no override for " on HashMap subclassKT-60262Support for inter-module interaction for@SubclassOptInRequiredKT-58739K2: RewriteCallableId.classIdto be thread-safeKT-64979K2: Missing REDUNDANT_TYPE_PARCELER when using type aliasKT-60019K2: Introduced PARCELER_TYPE_INCOMPATIBLEKT-62500K2: origin=GET_PROPERTY is wrongly set to GET_FIELD of backing field inside property's own getterKT-64743K2: Non-expanded type serialized in metadataKT-64405K2: Implement CompileJavaAgainstKotlinTestGenerated for K2KT-64837K2: NPE in fir2ir when generic transitive dependency class is missingKT-60258Support java-kotlin interop for@SubclassOptInRequiredKT-60260K2: Implicit coercion to unit is not generated in adapted function referenceKT-60858Remove redundantcreateDeprecatedAnnotationnecessary to workaround kotlinx-serialization compilation with nativeKT-64432Unbound symbol access in Fir2Ir fake override builderKT-64466K2: Delegated method annotations are not copied in IRKT-63589K1: Unsound type inference for unbound callable reference to star-projected class's generic mutable propertyKT-61032K2: False positive “Unused variable” for function callable referenceKT-64832K2: False positive "Unused variable" checker report on suspend functional types, on overloaded functional types and on custom invoke operator typesKT-64609K2: INAPPLICABLE_TARGET_PROPERTY_IMMUTABLE diagnostic is missed for primary constructor propertiesKT-61937K2: implicit script receiver from ScriptDefinition are not visible for invokeKT-27936Write InnerClasses attribute for all class names used in a class fileKT-31367IllegalStateException: Concrete fake override public open fun (...) defined in TheIssue[PropertyGetterDescriptorImpl@1a03c376] should have exactly one concrete super-declaration: []
Docs & Examples
KT-63001K2: Organize team-wide talks about new FIR2IR & PCLA
IR. Actualizer
KT-65274IrFakeOverrideBuilder: ISE: "IrFieldPublicSymbolImpl is already bound"KT-65236IrFakeOverrideBuilder: ISE: "should not be called"KT-65116K2: IrFakeOverrideBuilder: "No override for FUN" if the function has already been overridden by another class in K <- J<- K <- J hierarchyKT-65499IrFakeOverrideBuilder: ISE IrSimpleFunctionPublicSymbolImpl is already bound for irrelevant 'remove' clashing with a function from Java collection subclassKT-64150IrFakeOverrideBuilder: Fake overrides for static java functions are not generatedKT-65432IrFakeOverrideBuilder - No override for FUN IR_EXTERNAL_JAVA_DECLARATION_STUB name:elementDataKT-64895K2:IrActualizer corrupts attributeOwnerId value
IR. Inlining
KT-64868[K/N] Inlined assert is later not removed, even without-ea
IR. Tree
KT-64974Consolidate visibility checks in IrFakeOverrideBuilder
JavaScript
KT-34995JS: List, Map, and Set types are hard to use from JS because of mangled member namesKT-64548KJS / K2: "Cannot find delegated constructor call" caused by external classes constructorsKT-63359K2: support new ways to declare TestResult in JS TestGenerator loweringKT-44871Add@JsExportand@JsNameannotations to stdlib classes (especially collections) to avoid method name mangling and improve Kotlin usability from JSKT-64867K2 JS: Name clash between constructors with same JsName but in different classesKT-64463KJS / K2: "Name contains illegal chars that cannot appear in JavaScript identifier" caused by non-ASCII characterKT-65168Introduce an ability to create type-safe JS objects
KMM Plugin
KT-59270Update wizards in KMM AS plugin after 1.9.20 release
Klibs
KT-65063Clashing KLIB signatures from different modules result in an exceptionKT-61143[klib tool] Dump IR with unbound symbols
Language Design
KT-58881K2: Run checkers in common code against platform sessionKT-64187K2: False positive ABSTRACT_NOT_IMPLEMENTED caused by the fact that common code sees platform code of its dependenciesKT-62959Value of captured type is not a subtype of the same captured typeKT-64739Mark@SubclassOptInRequiredas an experimental
Libraries
KT-63397kotlin-test should declare runtime dependency on "org.junit.platform:junit-platform-launcher"KT-65242Update transitive dependencies of JVM test frameworks in kotlin-testKT-63355Detect concurrent modifications in ArrayDequeKT-57150Consider introducing Common protected property AbstractMutableList.modCountKT-64956Implement optimized removeRange for ArrayDequeKT-57151Consider introducing Common protected function AbstractMutableList.removeRangeKT-58039Wasm: Implement unsigned numbers using wasm builtin capabilitiesKT-63714K2: kotlinx-benchmarks fails with "Unable to find method ''org.gradle.api.tasks.TaskProvider" with register("js")
Native
KT-64249Native: Implicit cache directory search is O(n^2)
Native. C and ObjC Import
KT-64105[K2/N] cannot access Objective-C forward declared class used only in a dependent lib
Native. Runtime
KT-65170Kotlin/Native: deprecate -Xworker-exception-handling=legacy with error
Native. Runtime. Memory
KT-63423Kotlin/Native: huge dispose-on-main overheadKT-64313Kotlin Native: Seg Fault during Garbage Collection on 1.9.21 (observed on iOS)
Reflection
KT-57972Reflection: "KotlinReflectionInternalError" when usingcallBywith overridden function in inline class
Tools. CLI
KT-64608K2: Wrong end position of compiler diagnostics
Tools. Commonizer
KT-64376Commonizer incorrectly retains UnsafeNumber annotation in target sets where it shouldn't
Tools. Compiler Plugins
KT-64591Data class' copy method is never stripped from ABIKT-59074K2: false-positive MUST_BE_INITIALIZED_OR_FINAL_OR_ABSTRACT if allOpen plugin is used and a val is defined with init {} blockKT-64589jvm-abi-gen: Order of class members affects ABI jarKT-65072jvm-abi-gen: SourceDebugExtension annotation isn't stripped along with corresponding attributeKT-64971Exception is thrown when compiling kotlinx.coroutines to Native because of the new signature clash diagnosticsKT-54025[K2] [NONE_APPLICABLE] compiler error in case @ AllArgConstructor annotation is used together with a static fieldKT-54054[Lombok] An extra unneeded constructor parameter is expected by compiler if java class annotated with @ AllArgsConstructor and has private final initialized field
Tools. Daemon
KT-64283Configure correct JVM arguments when starting the daemon
Tools. Fleet. ObjC Export
KT-65108ObjCExport: Tests: Check if 'requirePlatformLibs' is necessaryKT-65281ObjCExport: AA: Run already passing Unit Tests on CIKT-65080ObjCExport: Analysis-Api: error handlingKT-64952ObjCExport: Analysis-Api: objectKT-64869ObjCExport: Analysis-Api: Support 'MustBeDocumented' annotationsKT-64839ObjCExport: Enable tests on CI for aggregateKT-64888ObjCExport: Analysis Api: Support exporting KDoc
Tools. Gradle
KT-62639Compatibility with Gradle 8.4 releaseKT-65143Use the new ConfigurationContainer dependencyScope method to create dependency declaration configurationsKT-64848Log K/Native compiler arguments with log level specified for compiler argumentsKT-65213Collect logic for FUS metrics calculation in one placeKT-61698Compiler options configured inside metadata {} target set up all targets in a projectKT-59024Compatibility with Gradle 8.3 releaseKT-60664Gradle 8.3: KGP eagerly creates compile task
Tools. Gradle. JS
KT-64119K/JS: Migrate package manager from Yarn onto NPMKT-65295Gradle: K/N and K/JS tests may produce unrequested TeamCity service messages
Tools. Gradle. Multiplatform
KT-61943Mark thecheckKotlinGradlePluginConfigurationErrorsas UP-TO-DATE when possibleKT-61559Include stdlib and platform dependencies to KotlinNativeCompilation.compileDependencyFiles APIKT-65196Add high-level DSL to configure compiler options in the multiplatform projectKT-61430K2/KMP: metadata compilation fails with Unresolved reference for property in actual class
Tools. Gradle. Native
KT-49268Only download Kotlin/Native Compiler when there are valid targetsKT-52567Use Gradle dependency management for downloading Kotlin/Native compiler when compiling with GradleKT-64903Add maven repo with dev versions into ITKT-51255Kotlin/Native should not download compiler artifacts when not necessaryKT-58303Kotlin multiplatform Gradle plugin downloads Kotlin/Native compiler during configuration
Tools. JPS
KT-65043JPS dumb mode should respect maps needed for the compiler
Tools. Kapt
KT-65684KAPT: (Re)enable fallback to K1 KAPT and make it defaultKT-61080Kapt: investigate suspicious check for KMutableMap.Entry in KaptTreeMakerKT-64479Kapt4 + Compose. Error: scoping construct cannot be annotated with type-use annotation:@androidx.compose.runtime.Composable
Tools. Wasm
KT-64851Wasm. Support Gradle configuration cache