Changelog
Analysis API
KT-80082K2. False positive "Cannot resolve method" for self-bounded generic with wildcard return type in Java interop
Analysis API. Code Compilation
KT-70860K2 IDE / Kotlin Debugger: CCE “java.lang.String cannot be cast to java.lang.Void” on evaluating not-null variable on the line with assigning null to that var
Analysis API. FIR
KT-81378Expected expression 'FirFunctionCallImpl' to be resolved caused bysuspend {}KT-80473Add events for tracking LL activities
Analysis API. Providers and Caches
KT-81476Analysis API:AlreadyDisposedExceptionfrom low-memory cache cleanupKT-80911Analysis API: Execute session invalidation in a non-cancelable sectionKT-81242Analysis API: Add UUID/lifetime properties to LL FIR session structure loggingKT-80622Analysis API: Visualise LL FIR session structure & weightKT-80904Analysis API: "Invalid dangling file module" exception during session invalidationKT-78882K2 AA: Calling containingSymbol on getProgressionLastElement causes exception
Analysis API. Standalone
KT-81108AA: java.lang.ClassCastException: class org.jetbrains.kotlin.fir.FirBinaryDependenciesModuleData cannot be cast to class org.jetbrains.kotlin.analysis.low.level.api.fir.projectStructure.LLFirModuleData
Analysis API. Stubs and Decompilation
KT-77097SupportReplaceWithdeprecation annotation argument via stubs
Analysis API. Surface
New Features
KT-80084Provide endpoints for Analysis API to understand when the context sensitive resolution is used
Fixes
KT-81132Use KaSession instead of a particular KaSessionComponent for context parameter bridgesKT-81129K2: KaSymbolInformationProvider#importableFqName: should return null for dynamic declarationsKT-81128K2: KaSymbolInformationProvider#importableFqName: should return null for error destructuring declarationsKT-81127K2: KaSymbolInformationProvider#importableFqName: should return null for anonymous functionsKT-81126K2: KaSymbolInformationProvider#importableFqName: should return null for enum entry initializer constructorsKT-81125K2: KaSymbolInformationProvider#importableFqName: should return null for property accessorsKT-81124K2: KaSymbolInformationProvider#importableFqName: type alias constructor should have a reference to the type alias and not to the underlying classKT-70127Analysis API: 'KaFirReceiverParameterSymbol' does not implement 'KaFirSymbol'; leads to exception fromimportableFqNameKT-81123Reimplement KaFirSymbolInformationProvider#importableFqNameKT-81122Drop KaImportOptimizerKT-79772Migrate from 'validityAsserted' to 'withValidityAssertion'KT-59857KaExpressionTypeProvider#returnType shouldn't throw an exception for class like declarations
Backend. Wasm
KT-79244[Wasm] Drop K1-specific tests, testrunners and test directivesKT-80397K/Wasm: turn on by default using a new version of the exception handling proposal for wasm-wasi targetKT-76204K/Wasm: support generating a wasm module per kotlin module/klibKT-81372K/Wasm: JsException: Exception was thrown while running JavaScript code on Safari 18.2/18.3KT-80106devServer in Kotlin/Wasm overwrites defaults, causing missing static paths
Compiler
New Features
KT-80837Warn about extension function with a context shadowed by memberKT-80031Check spotbugs's@CheckReturnValuein Kotlin's unused return value checker
Performance Improvements
KT-81617Native: casts optimizations pass explodes on deep nested loopsKT-81340K/N: severe compilation time degradation after turning on casts optimization passKT-52283Never ending type inference while compiling Kotlin code with lots of self pointing generics
Fixes
KT-81618"Number of arguments should not be less than number of parameters" on JVM on Kotlin 2.3.0-Beta1KT-81652Native: ClassCastException: ApplicationForegroundStateListener.CompanionKT-74999K2: KotlinNothingValueException within Extension FunctionKT-81254"AssertionError: There should be at least one non-stub type to compute common supertype": Parser issue during generic type inferenceKT-80250ISE: flow for PostponedLambdaExitNode not initialized - traversing nodes in wrong order?KT-81186Only allow local type aliases in REPL/scripts until full stabilizationKT-80929IC Native: Undefined symbols on ktorKT-81657K2: put warning about "exposing package-private in internal" under experimental language featureKT-81241Konanc exit while lowering org.jetbrains.kotlin.ir.util.IrUtilsKt.remapTypeParametersKT-74819K2: False-positive overload resolution ambiguity for flatMap inside PCLAKT-79506Contract for getter and setter doesn't work if a property is called from another moduleKT-71420Report error when reified type parameter is inferred to intersection typeKT-77727Move some of the extra checkers to the default listKT-81257Native: "Unexpected boolean predicate" when generating 'static_cache'KT-81525Report REDUNDANT_SPREAD_OPERATOR on (*) instead of argument expressionKT-81522Fix Light TreeSPREAD_OPERATORdiagnostic positioningKT-77008K2: Incorrectly force casting to a wrong typeKT-78127K2: Too precise inference for if/when with expected type in assignmentKT-80208K2: ClassCastException: "class java.util.ArrayList cannot be cast to class java.lang.Void" type inference picks Void for generic functionKT-79231Inconsistent InnerClass entry flags for abstract inner enumKT-20677Improve diagnostic about implicit default constructor absence for expected annotation classKT-9111Improve diagnostic for call with access to outer class from nested classKT-81385Missing error of nullable expression in class literal in case of reified type parameterKT-81141Fix FirUnsupportedArrayLiteralChecker to forbid array literals inside non-annotation contextsKT-81383Return type of anonymous function used asrunargument is incorrectly inferred toNothingKT-80577"Return type mismatch" for self-referential types used as generic parametersKT-81198Move type and type parameter annotations from jvm_metadata.proto to metadata.protoKT-81057Wrong handling of boxing during redundant casts optimizationKT-76479Backend. JVM: Report errors on exposure of types in inline functionsKT-81191K2: "null cannot be cast to non-null type ConeTypeParameterLookupTag" with invalid codeKT-81115Allow converting lambda with explicit parameter when assigning to variable of an extension function typeKT-74588Redundant checkNotNull intrinsics instructions for Java generic methodsKT-78390UnmuteFusStatisticsIT.testKotlinxPlugins()after AtomicFU updateskotlin-metadata-jvmKT-79369Forbid typealiasing for all compiler-required annotationsKT-76344Drop language version 1.9 for non-JVM platformsKT-69294K2: ReportCONSTRUCTOR_OR_SUPERTYPE_ON_TYPEALIAS_WITH_TYPE_PROJECTION_ERRORinstead ofEXPANDED_TYPE_CANNOT_BE_INHERITEDafter switching to LV 2.2KT-81064Wrong safe call null check handling during redundant casts optimizationKT-80871StackOverflowError on AnnotationTarget.TYPEKT-80908K2: Compiling type annotation with self-annotated vararg fail with exceptionKT-76902Omit type-use annotations from diagnosticsKT-70507Should parentheses prevent from plus/set operator desugaring?
Compose compiler
b/419049140Disabled memoization intryblocksKT-81081Generate Compose-specific proguard mappings when Compose compiler plugin is applied.
IDE. Gradle Integration
KT-46273MPP: Don't fail import for case of missed platform in source set structureKT-46417[UNRESOLVED_REFERENCE] For project to project dependencies of native platform test source setsKT-44845After update to Kotlin 1.4.30 all external dependencies is unresolved in IDE with kotlin.mpp.enableGranularSourceSetsMetadata=trueKT-46142K/N distribution is unavailable from IDE with multiplatform hierarchical project structure enabled
IR. Inlining
Fixes
KT-81673False warnings about ABI change in dependencies in library mode in 2.3.0-Beta1KT-81713[Inliner] Compilation of inline function with recursive call applied to TODO() fails with an internal errorKT-74892Investigate passing inline lambda as argument of another inline functionKT-78392CommonPrefix: Add a way of stopping execution when one of the phases is unsuccessfulKT-80927[Native] Review intrinsics with PublishedApiKT-81070[Inliner] kotlin/Any is unboundKT-80628KLIB inliner: Not enough information about the "full" modeKT-69516Double-inlining for Native: Enable visibility checks after 1st phase of inliningKT-78673Make fakeOverrideLocalGenericBase not using red codeKT-80565KLIB Inliner: Add a special annotation to prohibit inlining of marked inline functions in stdlib on 1st compilation phaseKT-79718KLIB inliner: Emit warning on generation ofpublicsynthetic accessor when running in "explicit API mode"
IR. Interpreter
KT-72356K2 Native: IllegalStateException when annotation has the same source range as a constant in another file
IR. Tree
KT-79739Static synthetic accessors inside generic classes access its type parametersKT-78100Track and annotate internal annotations with@PublishedApito enable annotation visibility validationKT-80825DropIrSerializationSettings.reuseExistingSignaturesForSymbolssettingKT-79807Broken IR tree invariants in IrReplSnippet after FIR2IRKT-78856Refactor LocalDeclarationsLowering to split it in smaller parts
JavaScript
KT-80401Kotlin/JS support fordefault exportin generated JavaScriptKT-79928Allow JsModule/JsNonModule/JsQualifier invocation on per-entity levelKT-81424Kotlin/JS: Cannot Get / in a simple running applicationKT-81066Wasm, JS: Remove redundant logging in compiler outputKT-79222K/JS: Allow using Long in exported declarationsKT-74055KJS:@JsPlainObjectadds JS code even if marked interface is not used
Klibs
KT-64237Klib metadata: migrate to using the common annotations instead of klib-specific extensions in the compilerKT-80999Reuse existingIrKotlinLibraryLayoutinKotlinLibraryfor reading pre-processed functionsKT-80761K2: [K/N] Should reported klib usage include inheritanceKT-80290Removeifand TODO incountInAsInlinedLambdaArgumentWithPermittedNonLocalReturnsKT-80298K/N: one-stage compilation is broken
Language Design
KT-81561Update nested type aliases KEEP to reflect local type aliases supportKT-28850Prohibit protected visibility in final expected classes
Libraries
KT-81078Increase kotlin.io.createTempDir and createTempFile deprecation level to ERRORKT-74493Deprecate String.subSequence(start, end) with error and drop it in the futureKT-81092Uuid: support generation of version 7 uuids with a given timestampKT-81043String.toBigDecimalOrNull rejects strings accepted by String.toBigDecimalKT-81477Uuid.Companion.generateV* are missing SinceKotlin annotationKT-80530Annotate Kotlin/Native stdlib with must-use value/@IgnorableReturnValuewhen appropriateKT-79791Duration.parse incorrectly handles negative decimal seconds in ISO-8601 formatKT-72111Change Duration.parseOrNull logic to not throw exceptions internallyKT-80431Remove suppression of "ACTUAL_ANNOTATIONS_NOT_MATCH_EXPECT" from stdlib
Native. C and ObjC Import
KT-81312Native: when-Xccall-mode directis used, mark unsupported declarations with unresolvable symbol name instead of@Deprecated(ERROR)
Native. Swift Export
KT-80969Swift Export: Callsuspendfunction asasyncon swift sideKT-81355Swift Export: Introduce a flag to turn off coroutines export
Tools. Build Tools API
KT-81602BTA: rename KotlinToolchains.jvm@JvmNamefor a more Java-friendly APIKT-81321Deprecate old BTA prototype APIKT-73090Gradle 8.11 kotlin compilation fails when run with -Pkotlin.compiler.runViaBuildToolsApi=trueKT-81130BTA: using KotlinVersion from stdlib in the API breaks when using isolated classloader
Tools. CLI
KT-81077Add JVM target bytecode version 25
Tools. Commonizer
KT-49735[Commonizer] :commonizeNativeDistribution fails for projects with two or more same native targetsKT-47523MPP: Unable to resolve c-interop dependency if platform is included in an intermediate source set with the only targetKT-48118Commonized c-interop lib is not attached to common main source setKT-46248MPP: Compile KotlinMetadata fails with Unresolved reference if only one native platform from shared source set is available
Tools. Compiler Plugins
KT-81348Incorrect bytecode mentioning error class/package is generated by kotlinx-serialization when private serializer in another module is not accessibleKT-81091[DataFrame] Receivers from FirExpressionResolutionExtension are not resolved in CodeFragmentKT-80944FirUserTypeRefImpl cannot be cast to class FirResolvedTypeRef in maven projectKT-80429Power Assert with "Run test using: IntelliJ": NoClassDefFoundError (org.jetbrains.kotlin.kotlinx.collections.immutable.ExtensionsKt) during compilationKT-64339Symbol Light Classes: No Arg compiler plugin generates synthethic constructor which is not seen from light classes
Tools. Gradle
New Features
KT-45161Gradle: Support registering generated sources with the Kotlin modelKT-71602Introduce KotlinTopLevelExtension
Fixes
KT-81837Run integration tests against AGP 8.13KT-77457Compile against Gradle API 9.0KT-81199Deprecate "org.jetbrains.kotlin.android" pluginKT-81719Do not register swift export related configurations when it's not requiredKT-75869KGP JS - Update deprecated constructorsKT-79047Gradle compileKotlin fails with configuration cacheKT-81415BTA: Duplicate daemons when compiling JVM + JS in KGPKT-80950KGP breaks configuration cache when signing plugin with GnuPG is appliedKT-67290Deprecate usage of HasKotlinDependencies inside KotlinCompilationKT-80763Add redirect link to error message when 'org.jetbrains.kotlin.android' plugin is used with built-in KotlinKT-64273Gradle: remove symbols deprecated after KT-54312KT-70251Gradle: hide compiler symbols in KGP
Tools. Gradle. BCV
KT-80687Add description to Gradle tasks [ABI Validation]
Tools. Gradle. Compiler plugins
KT-81827Add a switch for mapping file tasks in Compose Gradle plugin
Tools. Gradle. JS
KT-81009K/JS, Wasm: Promote deprecation of NPM and Yarn package manager internal functionsKT-76019Wasm/JS: Promote phantom-js for Karma deprecation to ERRORKT-81005K/JS, Wasm: Promote deprecation of ExperimentalWasmDsl to ErrorKT-81010K/JS, Wasm: Promote deprecation of internal JS functions to ErrorKT-81008K/JS, Wasm: Promote deprecation of ExperimentalDceDsl to ErrorKT-81007K/JS, Wasm: Promote deprecation of public constructors of JS declarations to ErrorKT-81006K/JS, Wasm: Promote wasm declarations in "js" package deprecation to ErrorKT-81004K/JS, Wasm: promote deprecation NodeJsExec.create to ErrorKT-75621KJS / Gradle: Disable npm in --offline mode
Tools. Gradle. Multiplatform
Fixes
KT-81200Deprecate 'androidTarget'KT-81060KMP stores common compilation dependency resolution in Configuration cache leading to error when deserializing (Android only)KT-77367[uklib] Project dependency to kotlin-jvm module leads to failure in transform during IDE importKT-61127Remove scoped resolvable and intransitive DependenciesMetadata configurations used in the pre-IdeMultiplatformImport IDE importKT-81434[uklib] androidCompileClasspath resolves java compatibility variant instead of android for uklib libraryKT-81249Kotlin 2.2.20 broke KMP implementation of ParcelizeKT-77066Promote kotlinArtifacts deprecation to an errorKT-74955Remove resources resolution strategy completelyKT-55312Replace "ALL_COMPILE_DEPENDENCIES_METADATA" configuration with set of metadata dependencies configurations associated per setKT-52216HMPP / KTOR: False positive "TYPE_MISMATCH" with Throwable descendantKT-55230Remove metadata dependencies transformation for runtimeOnly scope
Tools. Gradle. Native
KT-81134Native: Gradle configuration failure likely related to Klibs cross-compilationKT-77486Remove bitcode DSLKT-77732commonizeCInteropfailed with "Unresolved classifier: platform/posix/size_t"KT-80675Commonized cinterops between "test" compilations produce an import failure
Tools. Gradle. Swift Export
KT-81465Swift Export package is build with wrong targetKT-81460[KGP] Crash in SwiftExportRunner due to older stdlib
Tools. Kapt
KT-80843K2: KAPT: Crash on any data class with duplicate properties: "Sequence contains more than one matching element"KT-71786K2Kapt: Stubs generation does not fail on files with declaration errors
Tools. Maven
KT-814142.2.20 regression: OOM (Compressed class space) when in-processKT-78201Maven: migrate JVM compilation to the new BTAKT-81435Maven: Improve BTA classloader reusageKT-81218Kotlin Maven Plugin 2.2.20: Java classes not resolved with enabled incremental compilation without daemon
Tools. REPL
KT-80062ReplSnippetLowering sometimes produces IrConstructorCall with too many arguments
Tools. Scripts
KT-80071Kotlin script mode produces invalid IR: "value that is not available in the current scope"