Kotlin 2.3.0-Beta1
Pre-release
Pre-release
Changelog
Analysis API
KT-80303Move:native:analysis-api-klib-readerto:libraries:tools
Analysis API. Code Compilation
KT-80227Support unnamed context parameters in evaluationKT-78554K2 IDE / Kotlin Debugger: ISE “No override for FUN IR_EXTERNAL_DECLARATION_STUB” on calling toString() for local class instance during evaluationKT-73201K2 IDE: Error while evaluating expressions with local classes
Analysis API. FIR
KT-46375Analysis API: Support cross-file class redeclaration checks using indicesKT-80471Analysis API: Deduplicate equivalent call candidates inresolveToCallCandidatesKT-79653[Analysis API] ContextCollector: BODY context of enum classes doesn't contain enum entriesKT-75858K2 AA: False positive 'property must be initialized' on incremental analysis with 'field' usage and semicolon in setterKT-80231AnnotationArgumentsStateKeepers doesn't restore the initial annotation in some casesKT-80233Pull mutation out of AnnotationArgumentsStateKeepersKT-71466LLFirBuiltinsSessionFactoryusescreateCompositeSymbolProviderKT-76432JavaClassUseSiteMemberScope: Expected FirResolvedTypeRef with ConeKotlinType but was FirUserTypeRefImpl
Analysis API. Infrastructure
KT-80717Support IntelliJ Bazel build in the Kotlin Coop development mode
Analysis API. Light Classes
KT-80656Duplicate no-args constructor in PSIKT-60490Symbol Light Classes: Property accessors from a delegated interface don't present in the delegating classKT-79689SymbolLightClassForClassLike.toString() causes PSI tree loadingKT-79012Add a high-level overview of light classes
Analysis API. Providers and Caches
KT-78882K2 AA: Calling containingSymbol on getProgressionLastElement causes exceptionKT-58325Analysis API: CombineLLKotlinStubBasedLibrarySymbolProviders in session dependencies (optimization)KT-77825Analysis API:CheckersComponentconsumes a lot of memory while being unused in LL FIR sessionsKT-76526Incorrect built-in module is provided for non-JVM sources in StandaloneKT-62549Analysis API: Cache callables in combined Kotlin symbol providersKT-70721LL FIR: investigate possibility of movingLLFirFirClassByPsiClassProvider . getClassByPsiClass (PsiClass)to symbol providersKT-72998Analysis API: IntroducegetClassLikeSymbolByPsito LL FIR symbol providers
Analysis API. Standalone
KT-80573Potential performance issue on class ID computationKT-80559Try to optimize KotlinStandaloneDeclarationProviderFactory startup for testsKT-71706Analysis API Standalone:StandaloneProjectFactory.createSearchScopeByLibraryRootscreates inefficient file-based search scopes
Analysis API. Stubs and Decompilation
Performance Improvements
KT-77097SupportReplaceWithdeprecation annotation argument via stubs
Fixes
KT-77082StackOverflowError in CreateFreshTypeVariableSubstitutorStage.shouldBeFlexibleKT-80798Improve stubs tests coverageKT-75318Read context parameter fields from metadata in CallableClsStubBuilderKT-77874AA disagrees with the compiler on descriptions of context parameters from binaries in messages for context argument ambiguity errorsKT-80350Drop K1 decompilerKT-80276Implement native coping for stubsKT-79780Decompiled MultifileClass has Facade kindKT-79398isClsStubCompiledToJvmDefaultImplementation flag is inconsistent for compiled and decompiled stubsKT-79798Prettify stub usages in LL stub-based deserializerKT-78949AbstractLLStubBasedResolutionTest: tests against real stub-based filesKT-80251Inconsistent decompiled and compiled stub for properties with an initializer and a delegateKT-74547Implement decompiler for K2KT-79555Move KotlinFileStubImpl serialization/deserialization to the Analysis APIKT-79487"null DefinitelyNotNullType for 'T'" from decompilerKT-60764Stub Builder: fix differences between K1 and K2 stub building on decompiled filesKT-79484An empty enum class with a member decompiles with a synthetic errorKT-79730Decompiled files have an extraKtsuffixKT-79483data modifier is not present on object modifierKT-75398Local classes from scripts have ClassId in stubsKT-79412Context parameters with type annotations cause inconsistency errors while building stubs
Analysis API. Surface
New Features
KT-64340Analysis API: no way to get a type of vararg parameterKT-68387AA: provide context for type approximations
Performance Improvements
KT-80713Optimize KaDeclarationSymbol#visibility for class-like symbolsKT-79097KaFirNamedFunctionSymbol#isSuspend shouldn't trigger resolutionKT-79095isOverride shouldn't trigger resolution if not compiler plugins present
Fixes
KT-78093Add bridges for context parametersKT-79328K2 AA, isUsedAsExpression: Unhandled Non-KtExpression parent of KtExpression: class org.jetbrains.kotlin.psi.KtImportDirectiveKT-80366IllegalStateException from KaFirStopWorldCacheCleanerKT-80274Merge AbstractMultiModuleSymbolByPsiTest to AbstractSymbolByPsiTestKT-80352KaBaseResolutionScope.contains(PsiElement) always returns false for Android light classes (e.g. synthetic R.java classes)KT-80234Incorrect value ofisActualfor the implicitlyactualconstructor of annotation classKT-80178Incorrect modality for an abstract interface function with a redundantopenmodifierKT-79129[Analysis API]KaFe10TypeCreator.buildClassTypecannot build builtin types by class idsKT-79143AA:argumentMappingcontains an expression that is not an argumentKT-59857KaExpressionTypeProvider#returnType shouldn't throw an exception for class like declarationsKT-79667Enable resolve on java record components in standalone modeKT-73050KaFirSymbolRelationProvider#expectsForActual: suspicius logic for KaReceiverParameterSymbolKT-78904KaBaseWriteActionStartedChecker throws when no additional WA was doneKT-79281Add KDoc toKaTypePointer#restoreKT-78597KaUseSiteVisibilityChecker returns false for internal functions exposed via implicit receiverKT-71705FIR api impl: Postfix increment expression'sexpressionTypeis Unit when incrementing array elementKT-75057Analysis API: Reference to object through typealias in invoke operator call leads to original type
Backend. Native. Debug
KT-79848Flaky debugger tests in opt.debug/cache.*/GC.CMS/GC.sch.ad/alloc.custom configuration
Backend. Wasm
New Features
KT-59032Support instantiation of annotation classes on WASM
Fixes
KT-69621K/Wasm: Consider enabling support for KClass.qualifiedName by defaultKT-80018K/Wasm: exceptions don't work properly in JavaScriptCore (vm inside Safari, WebKit)KT-66072K/Wasm: improve how exceptions work in JS interopKT-80106devServer in Kotlin/Wasm overwrites defaults, causing missing static pathsKT-80210Wasm: "Unexpected non-external class: kotlin.Nothing" caused by JsExport with JsPromiseKT-80555WASM IC: Can't link symbol on kotlinx.coroutines on fresh masterKT-80415WasmJs Number Elvis Operator CrashKT-76509WasmJS: ReferenceError: Temporal is not defined caused by "Redundant reference to unused external results"KT-79317[Wasm] Do not throw CCE for ExcludedFromCodegen declarationsKT-78036K/Wasm: generate a message with "expected" and "actual" types in case of CCE
Compiler
New Features
KT-77676K/N: enable typechecks and the casts optimization pass in debug mode by defaultKT-80768Warning on overloading by a superset of context parameters in class contextKT-79185Support for local type aliasesKT-80461K2: false positive NO_ELSE_IN_WHEN for complex sealed hierarchyKT-79380Native: add performance measurement for the rest of backend phasesKT-79381Native: add performance measurement of LLVM phasesKT-80222Implement the prohibition of always-falseischecks for definitely incompatible typesKT-79295Parse and build raw FIR from new short and full forms of positional destructuring with square bracketsKT-74810Support typealiased/mapped Java types in unused return value checkerKT-71244Incorporate existing@CheckReturnValueannotation(s) into Kotlin's unused return value checkerKT-79922Record 'MustUse/ExplicitlyIgnorable' state for overrides even in disabled RVC modeKT-79920Store 'Explicitly ignorable' state of function/property in the metadataKT-79690Implement a USELESS_ELVIS_LEFT_IS_NULL with elvis expressionKT-79296Implement/adapt diagnostics for new destructuringKT-79298Report errors on new destructuring syntax in K1
Performance Improvements
KT-81340K/N: severe compilation time degradation after turning on casts optimization passKT-80554Kotlin/Native: investigate performance hit from always-on llvm pass profilingKT-80370Add NO_INLINE attribute to some of runtime functionsKT-80167K/N: condense the nodes and edges in DevirtualizationAnalysis constraint graphKT-79535Revert incorrect SAM conversion enhancements brought to K2
Fixes
KT-81257Native: "Unexpected boolean predicate" when generating 'static_cache'KT-80864K2: MissingVal cannot be reassigneddiagnostic for Java final fields (crashes in runtime withIllegalAccessError)KT-75215KDoc: references from@paramtag are rendered as plain textKT-79887K2 Compiler Internal Error in 'FirFakeOverrideGenerator.checkStatusIsResolved' MethodKT-78125false-negative shadowed contextual overload warning on local declarationsKT-79274Frontend implementation of name-based destructuringKT-81057Wrong handling of boxing during redundant casts optimizationKT-80285IJ monorepo: broken compilation after 2.2.20-RC updateKT-81015Mark nested typealiases as stable for 2.3KT-81064Wrong safe call null check handling during redundant casts optimizationKT-80744Kotlin failure on lambda with type parameterKT-78280Implement the sourcelessKtDiagnosticsKT-78819K2: False positive ABSTRACT_MEMBER_NOT_IMPLEMENTED in KJK hierarchyKT-81018ISE "IR class for Foo not found" on missing dependency when lowering SAM constructorKT-80936NON_PUBLIC_CALL_FROM_PUBLIC_INLINE :@PublishedApidoesn't work for fun interfacesKT-75748StackOverflowError when reading array from metadata annotationsKT-80400K2: AbstractMethodError on fun interface implementation inheriting from an interface compiled with -jvm-default=disableKT-80940K2: Exception in FIR2IR with AnnotationTarget.TYPE with self-annotated non-vararg default argument and usage in child moduleKT-80538KaFirDiagnostic.EmptyRange doesn't work in most of the casesKT-80524Class is not abstract and does not implement abstract member when compiling with kotlinc-jklibKT-80597Apply fix for CVE-2024-7254 to our fork of protobuf 2.6.1KT-80849K2:ConstValueProviderImpldoesn't distinguish files with same name and packageKT-80602Exhaustiveness checker improvements for 2.3KT-80735Support || return/throw shortcut in unsed return value checkerKT-79651Report a warning about an unused return value only on the function nameKT-80719False positive: "Redundant visibility modifier": when overriding protected methods as "public"KT-80711IC Native: NPE during link on ktorKT-80795Wong type cast is added for IMPLICIT_COERCION_TO_UNITKT-80434K2: DSL marker doesn't work with lambda fieldsKT-80383Getter without a body is allowed on a property with an explicit backing fieldKT-80455K2: StackOverflowError in when exhaustiveness checker on red codeKT-72862[Native caches] Umbrella for failing codegen/box tests for corner cases in synthetic accessorsKT-20278NO_TYPE_ARGUMENTS_ON_RHS: Confusing diagnostic for inner class of generic outer classKT-80164Move name generation for unnamed context parameters to frontendKT-78112RETURN_VALUE_NOT_USED is reported for local function even if it isn't marked with annotation in CHECKER modeKT-48311Incorrect LINENUMBER after if with a suspend callKT-80688Bad SourceDebugExtension caused by enhanced coroutines debuggingKT-73851Native: compilation fails with ClassCastException with genericSafeCasts=trueKT-77593Add a warning when@IgnorableReturnValueis inconsistent between expect/actual functionsKT-78895Consider dropping isLocalInFunction and FirClassLikeDeclaration.isLocalKT-79386Confusing error message when named parameters are used for java method callsKT-80600K2: Private and final modifiers are allowed on setter of open delegated propertyKT-79783KDoc parser: Links aren't rendered if the line has an indent of 4 or moreKT-77101Invoke on callable reference is considered ignorableKT-79923Remove lookup of@IgnorableReturnValueannotation from FirReturnValueOverrideCheckerKT-80517Synthetic kotlin.Any members in data classes are missing@MustUseReturnValueKT-80194VAR_TYPE_MISMATCH_ON_OVERRIDE: doesn't mention the inferred typeKT-80484K2: ClassCastException due to fake source for implicit lambda parameter (RedundantNullableChecker)KT-79979K2: ClassCastException when overriding extension property with delegationKT-80592UninitializedPropertyAccessExceptionwhen anayzing annotations on members of anonymous classesKT-80399Anonymous Kotlin class incorrectly warns about deprecated java override despite '@Deprecated' annotationKT-79610Adding CocoaPod to Kotlin/Native MPP triggers IR serialization failure and commonizer errorsKT-79866kotlinc 2.2.0 silently emits 'NonExistentClass' instead of reporting an errorKT-78664False positive VARIABLE_NEVER_READ and ASSIGNED_VALUE_IS_NEVER_READ on function type variable with splited declaration and assignmentKT-79496False positive "when must be exhaustive" in triangle interface/class hierarchyKT-79774KtDestructuringDeclaration.getLPar & getRPar are brokenKT-79442"Multiple annotations of type kotlin.coroutines.jvm.internal.DebugMetadata": 2.2.0-Beta1 generates broken code with JVM default suspend methods in interfacesKT-80391K2: Only one context parameter is mentioned in the [NO_CONTEXT_ARGUMENT] diagnosticKT-79785ktypew:kotlin.collections.List already exists error using Swift ExportKT-78879"Sealed types cannot be instantiated": Can't instantiate Java-defined sealed Class from KotlinKT-80330K2: NPE at org.jetbrains.kotlin.fir.resolve.calls.FirCallResolver.createResolvedNamedReferenceKT-21598Extension is shadowed by member should not be reported when member is deprecated with HIDDEN levelKT-79622FUNCTION_EXPECTED: Misleading 'expression cannot be invoked as a function' when inaccessible with private lambdaKT-80255[EXTENSION_FUNCTION_IN_EXTERNAL_DECLARATION] can be attached to the receiver type of a functional typeKT-79816Java Interfaces implemented by delegation have non-null return checksKT-80177Improve message of RECEIVER_SHADOWED_BY_CONTEXT_PARAMETER in case of member extensionKT-79770There is no RECEIVER_SHADOWED_BY_CONTEXT_PARAMETER if the usage of fun is from inside the classKT-79430False positive EXTENSION_SHADOWED_BY_MEMBER on overridden member extensionKT-62934Incorrect line mapping inside inline lambda after non-local returnKT-79545K2: no error on crossinline lambda usage in anonymous object base constructor callKT-79643HAS_NEXT_FUNCTION_AMBIGUITY and NEXT_AMBIGUITY diagnostics are always ignored in favor of HAS_NEXT_FUNCTION_NONE_APPLICABLE and NEXT_NONE_APPLICABLEKT-79327Modifier 'private' is not applicable to 'value parameter' is reported for context parametersKT-76453K2 IDE: autocomplete freezeKT-77182A function in a file annotated with@file:MustUseReturnValue doesn't produce a warning when it is used from compiled codeKT-78541Jspecify: Unsound platform type despite@NullMarkedfor an override with a generic-subclass return typeKT-79672'when expression must be exhaustive' even after using 'require()'KT-71306K2 IDE / Kotlin Debugger: “Cannot find local variable 'block' with type kotlin.jvm.functions.Function0” on evaluating lambda arg inside inline functionKT-80003Kotlin/Native: deprecate eager GlobalData initializationKT-76991K2 IDE / Kotlin Debugger: ISE “Couldn't find declaration file for” on evaluating local fun when the scope has also inline fun from another file callKT-79877K2 IDE / Kotlin Debugger: failed evaluations of a code fragment capturing local data classKT-77401[FIR]ParameterNameTypeAttribute.namedoesn't support@ParameterNamewith compile-time constant property argumentKT-79682Fix partially uninitialized locals after coroutine spills insertionKT-79276Dexing fails with "Cannot read field X because is null" with 2.2.0KT-79562NPE when passing non-lambda argument of nullable non-suspend function type into function that accepts nullable suspend function typeKT-79693NotImplementedError: An operation is not implemented: Unknown file with KMP separate compilationKT-79662Unused return value checker doesn't work for com.google.errorprone.annotations.CheckReturnValueKT-79781Missing MISSING_DEPENDENCY_CLASS when using type alias with inaccessible RHSKT-79547"UnsupportedOperationException: Not supported" with inlining and value classesKT-77772Only report exposed type on qualifier if it's resolved to an objectKT-79765K2. Do not report ignore return value for unresolved referenceKT-76343Drop language version 1.8KT-79017False negative REDECLARATION on private nested classKT-72039StackOverflowError on calling keySet on a Kotlin subclass of Java subclass of ConcurrentHashMapKT-79451Rework approach to recursive types approximationKT-75843K2: incorrect line numbers in an if-expression with a super-callKT-77504Add a warning when@IgnorableReturnValueis inconsistent on overridesKT-78389Perform version 2.3 boostrappingKT-79092Crash on default argument in function in fun interfaceKT-77729Package-level@NullMarkeddoes not work when kotlinc sees .java source filesKT-79013False negativeNOT_YET_SUPPORTED_IN_INLINEon inline local functions inside inline functionsKT-79139False positive CONFLICTING_OVERLOADS for context parameters instead of receiversKT-35305Address the overload conflict resolution between unsigned and non-primitive typesKT-42096No diagnostic reported oninlinemodifier on an enum entryKT-79355Failed to fix the problem of desugaredincwith new reverse implies returns contractKT-79277Implies returns contract doesn't affect the return type of the function if it is in the argument positionKT-79271Implies returns contract doesn't impact exhaustivenessKT-79218SMARTCAST_IMPOSSIBLE for top‑level extension‑property getter despite returnsNotNull contractKT-79220returnsNotNull contract ignored on extension function with nullable receiverKT-79354IllegalStateException: Debug metadata version mismatch. Expected: 1, got 2 with compiler 2.2.20-Beta1 and stdlib 2.2.0KT-77986K2: False negative: "Local classes are not yet supported in inline functions"KT-79456Redeclaration conflict checks of private top-level classifiers rely on an incorrect containing fileKT-79125RVC full mode: delegated interfaces are not checkedKT-63720Coroutine debugger: do not optimise out local variablesKT-78595type variable leak on a generic property as a call argument given an unstable smart castKT-79076'IllegalStateException: Cannot serialize error type: ERROR CLASS: Uninferred type' with Exposed column using recursive generic typeKT-75797Native: find a way to handle generates C bridges in inline functionsKT-59807K2: Replicate the MUST_BE_LATEINIT logic from K1KT-76782K2: Incorrect resolve into unrelated invoke operator with wrong diagnosticKT-78066TYPE_PARAMETER_OF_PROPERTY_NOT_USED_IN_RECEIVER error message does not account for context parametersKT-76136Switch latest stable version in Kotlin project to 2.3KT-78881K2: False positive "Assigned value is never read" in composable functionKT-76065Drop JavaTypeParameterDefaultRepresentationWithDNN featureKT-77808Inference: recheck the code about DNN-related hacksKT-24202NOTHING_TO_OVERRIDE if super-class reference misses generic argumentsKT-78909K2: Missing diagnostics [CYCLIC_INHERITANCE_HIERARCHY] for recursive class inheritance leads to StackOverflowErrorKT-75969java.lang.IllegalArgumentException: source must not be null on red codeKT-76902Omit type-use annotations from diagnosticsKT-58988K2: Deprecate exposing package-private parameter of internal methodKT-17460Diagnostics and intention on suspend function that is overriden with non-suspend one.KT-56665K2: false positive RECURSIVE_TYPEALIAS_EXPANSIONKT-78932Contracts are allowed for open and overridden property accessorsKT-77203FIR: Consider adding destructured type to all COMPONENT_FUNCTION_* diagnosticsKT-76635Implement Data-Flow Based Exhaustiveness SupportKT-77685"IllegalArgumentException: Sequence contains more than one matching element"KT-78452Drop redundant frontend structures after fir2ir conversion
Compose compiler
New features
98d3907Introduce a compose group analysis module that produces a proguard/R8 mapping from group keys in bytecode.
Fixes
b/431025881[Compose] Clean up runtime version checkerb/365922168Addjava.util.Localeto the list of known stable classesb/407549020Introduce a registry of known stable markersb/417989445Added a diagnostic to restrict usages ofrunCatchingin@ComposablefunctionsKT-80294Fix crash with inline@Composablefunction referenceb/430140896Fix IrSourcePrinter output for when branch check and typechecks
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. Actualizer
KT-80002Investigate the need for map copying in IrCommonToPlatformDependencyExtractor.ktKT-80131KMP Separate Compilation: No override for FUN IR_EXTERNAL_DECLARATION_STUB name:KT-80064KMP Separate Compilation: ClassCastException: class org.jetbrains.kotlin.ir.symbols.impl.IrTypeAliasSymbolImpl cannot be cast to class org.jetbrains.kotlin.ir.symbols.IrClassSymbolKT-80051KMP Separate Compilation: Actualization of common dependencies failed on 'PROPERTY FAKE_OVERRIDE name:modCount visibility:protected modality:FINAL [fake_override,var]'KT-79998KMP Separate Compilation: java.lang.IllegalStateException: No override for FUN IR_EXTERNAL_DECLARATION_STUB name:KT-77337IrNoExpectSymbolsHandlerfinds expect class reference after enabling annotation traversal in IR
IR. Inlining
New Features
KT-70360KLIBs: Uniformly handletypeOf()calls at 1st/2nd stages of compilation
Performance Improvements
KT-69497Crossinline lambda is allocated on K/N & JS
Fixes
KT-79334Unify intrinsics used on 1st phase of IR inliner in KLIB-based compilersKT-80610KLIB inliner: Always apply cross-module inlining to pre-processed inline functionsKT-80565KLIB Inliner: Add a special annotation to prohibit inlining of marked inline functions in stdlib on 1st compilation phaseKT-80883[Inliner] Run pre-serialization lowerings in all testrunnersKT-77876IrVisibilityChecker: Different set of exceptions for 1st and 2nd compilation stagesKT-80693[IC] Split IC invalidation tests for cross-module IR InlinerKT-79718KLIB inliner: Emit warning on generation ofpublicsynthetic accessor when running in "explicit API mode"KT-78537[Inliner] Incorrect KFunction.name of a reference to inlined local functionKT-80226[IR Inliner] Generate constructor accessors as constructors, not static functionsKT-80653[IR Inliner] Space: "Local declarations should've been popped out by this point"KT-80692[IC] Split IC invalidation tests for intra-module IR InlinerKT-77103[Inliner] IrLocalDelegatedProperty was not serialized, while its symbol and IrRichPropertyReference were.KT-78392CommonPrefix: Add a way of stopping execution when one of the phases is unsuccessfulKT-78903Unifycodegen/boxInlinetests withcodegen/boxKT-78989Add missing PL tests for inline functions/property accessorsKT-79771kotlinx-coroutines-core: Public synthetic accessor generated with enabled KLIB IR inlinerKT-79680IrConstructorSymbolImpl is unboundin lambdaWithoutNonLocalControlflow.ktKT-70849Ensure correct debug info for intra-module IR inlining on the first compilation phaseKT-79800JS BE errors with default values when IR inliner is enabledKT-79352Remove excessive validations fromValidateAfterAll...on the first stageKT-76599MigrateIrValidationAfterInliningAllFunctionsPhaseto the first stage of compilationKT-78245Synthetic Accessors incorrectly copies default valuesKT-72594[JS][Native] Add IrInliningFacade to test runners
IR. Interpreter
KT-72881K2: incorrect empty array as annotation argument when parameter has default value
IR. Tree
Fixes
KT-77819[IR] Fine-tune IrValidator's run after Fir2IR and IR pluginsKT-70160Remove IrDeclaration.parents after Anvil updateKT-80454LocalDeclarationsLowering: Clean-up the dead codeKT-80819Rework IrFileValidator to use Hashmap instead of ClassValueKT-80516Kotlin-like IR dump: Don't render tailrec as lateinitKT-79439KLIB stdlib symbols loading: Split the result of merging of IrBuiltins with BuiltinSymbolsBase hierarchy into two parts (for 1st & 2nd phases)KT-79437KLIB stdlib symbols loading: Drop loading functions from IrBuiltins and migrate usages to SymbolFinder functions and lazy filteringKT-79569Unexpected error during DFG phase in Native due to PL issue with SAM conversion represented by rich referenceKT-79371Fix handling of broken SAM conversion in PL with enabled Rich ReferencesKT-76601IrValidatorConfig should have all checks disabled by defaultKT-69662Deduplicate functioncreateTemporaryVariableKT-79440KLIB stdlib symbols loading: Drop BuiltinSymbolsBase from plugin APIKT-78960[FO] Limit static fake overrides generation for static functionsKT-76813IR validator: not all symbols/references are visited
JVM. Reflection
KT-76521Reflection: change KType representation to avoid dependency on K1KT-74624Reflection: KClassifier.createType(...) ignores annotations parameterKT-80203Reflection: provide a way to use legacy K1-based implementationKT-80236Reflection: KType.toString for raw types no longer renders "(raw)"KT-79020Suspend lambdas return type is shown as ??? in reflectionKT-79206Reflection: suspend functional type classifier is nullKT-74529Context parameters support in reflection
JavaScript
New Features
KT-79284Use BigInt64Array for LongArrayKT-79394Add the possibility to write common external declarations between JS and WasmJS targets
Performance Improvements
KT-57128KJS: Use BigInt to represent Long values in ES6 mode
Fixes
KT-81424Kotlin/JS: Cannot Get / in a simple running applicationKT-80873KJS: Stdlib requires ES2020-compatible JS engine due to BigInt type literalKT-56281KJS: Can't export suspend functionsKT-72833KJS: Source maps have incorrect sources paths inper-fileKT-79926Wrong export of interfaces with companions with ES ModulesKT-72474KJS:@JsPlainObjectdoesn't honour -XXLanguage:+JsAllowInvalidCharsIdentifiersEscapingKT-79644BigInt enabled for ES 2015 despite being an ES 2020 featureKT-79089KJS: Could not load reporter / Cannot find module 'mocha' when running jsNode testsKT-52771KJS: Pair should be exported to JavaScriptKT-79704Unify variance rendering between JS and other backendsKT-69297Deprecate referencing inlineable lambdas injs()callsKT-80168Allow@JsStaticinside interface companionsKT-80086[k/js] Resolving imported string literalsKT-79066[Kotlin/JS] jsNodeTest fails with SyntaxError when a test file has@file:JsExport and useEsModules() is enabledKT-79359Kotlin/JS: Suspending function doesn’t return Unit on es2015KT-77385Investigate partial linkage problems for JS HMPP testsKT-79628Remove IR nodes from ExportModelKT-79916K/JS: "Uncaught TypeError" when using 'Xes-long-as-bigint' in compose-htmlKT-79050KJS / IC: "Unexpected body of primary constructor for processing irClass"KT-79977KJS: Long.rotateLeft returns incorrect result when BigInts are enabledKT-70222Remove legacy JS BE-related CLI flagsKT-78831AbstractFunctionReferencesLowering: fragile fake override generationKT-52230KSJ IR: Applying identity equality operator to Longs always returns falseKT-6675KotlinJS: toInt() on external Long throws errorKT-79184K/JS: Further intrinsify BigInt-backed Long operations
Klibs
Performance Improvements
KT-80861[Klib] Deduplicate IrFileEntry.nameKT-80866[Klib] Optimize size of IrFileEntry.line_start_offsetKT-80438Uncached KlibMetadataClassDataFinder.findClassData
Fixes
KT-80298K/N: one-stage compilation is brokenKT-80099KLIB resolver: Could not find file because of missingklibextension in resolved symlink pathKT-79958KLIB tool fails to render IR if there is IrErrorType in a lirbraryKT-75241Move ExperimentalLibraryAbiReader to a publishable artifactKT-76260MakeIrRichCallableReferencesInKlibslang feature stable in LV=2.3KT-61552[PL] IndexOutOfBoundsException in SAM conversion with substituted functionKT-74417Deduce the metadata version based on LV in KLIB-based backendsKT-75980[Klib] Reduce serialized size of IrFileEntries for sparse usage of another source filesKT-73826DeduplicateIrFileEntrythat is serialized insideIrInlinedFunctionBlock
Language Design
KT-76926Allow return in expression bodies if return type is specified explicitlyKT-23610Overload resolution ambiguity for suspend function argumentKT-32619JS: return Promise whencontinuationis not providedKT-78866Warn implicit receiver shadowed by context parameterKT-78976Decide if K2 should support local functions inside of local inline functionsKT-79308Ability to actualize empty interfaces as AnyKT-48872Provide modern and performant replacement for Enum.values()
Libraries
New Features
KT-31400Add smartcast forisArrayOfKT-78463Annotate wasm and JS targets of kotlin-stdlib with@IgnorableReturnValuewhen appropriateKT-74444EnumEntries type should implement RandomAccessKT-78462Annotate kotlin-stdlib-jvm with@IgnorableReturnValuewhere appropriate
Fixes
KT-80778Stabilize kotlin.time.Clock and kotlin.time.InstantKT-80619[KLIBs] Enable intra-module inliner in stdlib & kotlin-testKT-76773stdlib: contextOf's type argument can be inferred via contextOf's context argumentKT-71822Intersection with (subtraction from) an identity set may produce incorrect resultsKT-74411Introduce Uuid.generateV4() and generateV7()KT-80605Rename MustUseReturnValue -> MustUseReturnValuesKT-56822Deprecate Number.toChar() with error deprecation levelKT-69947KLIB stdlib: All intrinsics that can be used in KLIBs with inlined IR must be included in stdlib ABI dumpKT-59044Improve various aspects of TimeSource documentationKT-80544Mark controversial path extensions (like .deleteRecursively()) as ignorableKT-80603K/N and K/Wasm: \p{N} category is not supportedKT-79192Increase InputStream.readBytes(Int) deprecation level to HIDDENKT-80661ArrayDeque.lastIndexOf may return -1 for an element present in the dequeKT-80390ArrayDeque.indexOf(null) wrongly returns 0 after removalsKT-79094Change signature of assertFailsWith or make lambda excluded otherwiseKT-72028Incorrect parameters order in IndexedValue documentationKT-80130[stdlib] Commonize AssociatedObjects in commonNonJvmMainKT-80107[stdlib] Move CancellationException to commonNonJvmMainKT-80179Investigate why StringBuilder.length is not enhanced automaticallyKT-80046Increase test coverage of Duration.parse[IsoString][OrNull] methodsKT-76459Remove comments about sorting stability in unsigned-type arraysKT-79489Generate Stdlib API reference for webMain source setKT-78243Drop JS- and Wasm-specific IrLinkageError classesKT-79108Remove the default argument forlinkageErrorfrom kotlin.js.getPropertyCallableRefKT-79130K/JS: Remove bodies from intrinsified Long methodsKT-79239K/Wasm: elementAt extension function of Array/PrimitiveArray/UnsignedArray does not throw IndexOutOfBoundException on incorrect indexKT-79256K/Wasm: MatchResult.groups raises a trap on invalid group indexKT-57317Repack EnumEntries from stdlib into the compiler
Native
KT-79384K/N: Application Not Responding: Thread DeadlockKT-80536Native:DependencyDownloaderseems to have no timeoutKT-80624Bump minimal watchOS supported versions to 7.0KT-80620Bump minimal iOS and tvOS supported versions to 14.0
Native. Build Infrastructure
KT-80147Set proper LV and AV forkotlin-native/performance/buildSrcKT-79474Kotlin/Native: fix breakpad buildKT-79215Kotlin/Native: fix distInvalidateStaleCaches on windows
Native. C and ObjC Import
KT-79571Xcode 26 beta 4: CInteropKT39120TestGenerated.testForwardEnum failedKT-79753Native: support CCall.Direct calls in the compilerKT-80838Cinterop fails with an error when Compilation works fineKT-79752Native: make cinterop generate CCall.Direct annotationsKT-49034Kotlin/Native:cnames.structs.Fooresolves into wrong declaration
Native. ObjC Export
KT-78810[ObjCExport] Enable explicit ObjC block parameter names by defaultKT-80271ObjC/Swift Export: Remove Native platformCloneablechecksKT-78604Consider not inheritingKlibScopefromKaScopeKT-79767ObjCExport: private companion must not be exposedKT-79724ObjCExport: extensions orderKT-79548ObjCExport: mangling difference between K1 and K2 when translating KotlinDurationCompanionKT-79475ObjCExport: invalid property getter translationKT-79346ObjCExport: Any method overridesKT-78871ObjCExport: translation of keywordreleasewith parameter generates invalid header
Native. Runtime. Memory
KT-75918Native: Deprecate -Xallocator=stdKT-80678Native: pagedAllocator=false sweep is slowKT-75916Native: Enable sanitizer support with pagedAllocator=false
Native. Swift Export
KT-80111Swift Export Build Fails Due to Errors in KotlinStdlib.swiftKT-80884Swift Export: support async in SIRKT-80185Swift Export: IllegalArgumentException – Collection contains more than one matching elementKT-79889K/N: swift-export fails under several different conditionsKT-79518Swift export: represent kotlin.Any as swift.anyKT-78603Do not inherit SirAndKaSession from KaSessionKT-79227Swift Export: Fix First Release IssuesKT-79521'_CoroutineScope' is inaccessible due to 'internal' protection levelKT-79181Swift Export Fails When Using T: Comparable Generic Constraint in Kotlin Classes
Tools. Ant
KT-75875Remove Ant support
Tools. BCV
KT-80313Add ability to generate dump from jar files [ABI Tools]
Tools. Build Tools API
KT-79409BTA: Support removed compiler arguments properlyKT-78196BTA: implement API adapter for the prototype implementationKT-77999BTA: Generate BTA options from compiler arguments descriptionsKT-78194BTA: port the JVM prototype to the new designKT-78193BTA: Implement core infrastructure according to the new designKT-78195BTA: migrate the test infrastructure from the prototype to the new design
Tools. CLI
KT-79867CompilerConfiguration.configureSourceRoots puts obfuscated file paths instead of ones passed onclasspathto CLIConfigurationKeys.CONTENT_ROOTSKT-80348Expose 'XXLanguage' compiler argument as a normal argumentKT-80428KMP Separate Compilation: Handle friend dependenciesKT-74590Deprecate -Xjvm-default in favor of -jvm-defaultKT-80349KMP Separate Compilation is enabled on non-KMP compilationsKT-79982Fix description of -Xjspecify-annotationsKT-79403Improve generator for deprecated CLI argumentsKT-75968Set proper lifecycle for all existing compiler argumentsKT-79293Create Language Features and compiler argument with parameter for new destructuring features
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 Plugin API
KT-74867LLFirIdePredicateBasedProvider matches local classes when it shouldn'tKT-52665DeprecateComponentRegistrarKT-55300Provide a mechanism to describe ordering and dependencies for compiler pluginsKT-75865Provide an API for setting the file name for the file with top-level declarations generated by a plugin
Tools. Compiler Plugins
KT-80815NoArg compiler plugin: Promote NO_NOARG_CONSTRUCTOR_IN_SUPERCLASS diagnostic from warning to errorKT-80822False positive NO_NOARG_CONSTRUCTOR_IN_SUPERCLASS reported for a class with explicit noargs constructor already presentKT-53122Constructors generated with NoArg have no@Metadataand are invisible for the frontendKT-79319Lombok: NullPointerException onmvn compilewhen importing Java constantsKT-74687Kotlin Lombok: False positive when calling builder on Java recordKT-80419Remove bundled jetbrains annotations from kotlin-dataframe-compiler-pluginKT-79245[AtomicFU] Drop K1/JS- and K1/Native-specific testrunnersKT-79197DataFrame: Cannot find local variable 'this@df' with type Scope0KT-73865Incorrect type is generated for irPropertyReference during K/N transformation
Tools. Compiler plugins. Serialization
KT-70345Promote COMPANION_OBJECT_IS_SERIALIZABLE_INSIDE_SERIALIZABLE_CLASS diagnostic to errorKT-79695Serialization does not exclude field-less properties in 2.2.20-Beta2KT-79246[Serialization] Drop K1-specific testrunners
Tools. Gradle
Fixes
KT-80763Add redirect link to error message when 'org.jetbrains.kotlin.android' plugin is used with built-in KotlinKT-81038Gradle: remove support for properties disabling precise task outputs backupKT-75449Update deprecation ofKotlinJsTestFramework#createTestExecutionSpecKT-80875Gradle: runToolInSeparateProcess may fail on Windows with too long command lineKT-79851Emit an actionable warning/error on unsupported AV/LV configured bykotlin-dslKT-64273Gradle: remove symbols deprecated after KT-54312KT-77458Run Gradle integration tests against Gradle 9.0KT-74915Make ExtrasProperty.kt internalKT-64992Remove KotlinCompilation.sourceKT-76720Raise deprecation level to error for Kotlin*Options propertiesKT-80172Error message changes depending on the order of applying 'org.jetbrains.kotlin.android' and 'AGP' 9.0+ with built-in Kotlin pluginKT-76177Remove deprecated classpath snapshot task inputsKT-79238Bump minimal supported AGP version to 8.2.2KT-79339Remove additionalMetadata from compiler options DSLKT-78741Add FUS analytics for klib cross-compilationKT-73478Add module level descriptionKT-80083KGP IT: fix tests on WindowsKT-79034Automatically disable cross compilation if it's not supported on the hostKT-79408A lot of errors files are created when compile KotlinKT-78827Rewrite Gradle compiler options DSL generator
Tools. Gradle. BCV
KT-80621Move Gradle tasks into suitable groups [ABI Validation]KT-78625Kotlin's built-in BCV generates empty .api files
Tools. Gradle. JS
KT-79910Wasm, JS: Upgrade NPM versionsKT-79921Web Tooling Gradle API does not respect webpack reconfigurationKT-76996Wasm: js tasks triggers wasm subtasksKT-79237Upgrade NPM dependencies versions
Tools. Gradle. Multiplatform
New Features
KT-76446Add kotlin-level dependency block to work the same way as commonMain/commonTest dependencies blocks
Fixes
KT-80785Withandroid.builtInKotlin=falseandandroid.newDsl=true, usingkotlin-androidplugin will fail withClassCastExceptionKT-61127Remove scoped resolvable and intransitive DependenciesMetadata configurations used in the pre-IdeMultiplatformImport IDE importKT-62614Remove legacy kotlin-gradle-plugin-modelKT-79559AGP complains about configurations resolved at configuration time due to KMP partially resolved dependencies diagnosticKT-78993The value for property '*' property 'dependencies' is final and cannot be changed any furtherKT-74005Implement a prototype of Unified Klib support in Kotlin Gradle PluginKT-76200TestModuleProperties.productionModuleName for JVM module isn't present with 2.1.20-RCKT-55312Replace "ALL_COMPILE_DEPENDENCIES_METADATA" configuration with set of metadata dependencies configurations associated per setKT-52216HMPP / KTOR: False positive "TYPE_MISMATCH" with Throwable descendantKT-54312TCS: Replace CompilationDetails abstract class hierarchy by composable implementationKT-55230Remove metadata dependencies transformation for runtimeOnly scope
Tools. Gradle. Native
KT-80675Commonized cinterops between "test" compilations produce an import failureKT-64107Kotlin Gradle plugin allows native binaries to have bothdebuggableandoptimizedflags set totrueKT-74910BumpdestinationDirin CInteropProcess to hiddenKT-74911Promote CInteropProcess.konanVersion to hiddenKT-74864Enable exporting KDocs by default to ObjCKT-72705K/N: compile task cache can not be used due to 'artifactVersion' input property
Tools. Gradle. Swift Export
KT-79524NoSuchMethodError: 'java.lang.String org.gradle.api.artifacts.ProjectDependency.getPath() for swift export with dependency export fro gradle < 8.11
Tools. Incremental Compile
KT-75864Implement a conservative mechanism of the IC with compiler plugins generated top-level declarationsKT-79504Implement an API to provide IC lookups from backend pluginsKT-55982K2: Consider global lookups from plugins in incremental compilationKT-75657Fix difference in incremental compilation scenarios in BTA in-process vs daemon compilation modeKT-79541Refactor tracking of files relation in ICKT-74628Incremental compilation runner does not check compiler exit code before mapping sources to classes
Tools. JPS
KT-77347Support file-less compatible IC approach
Tools. Kapt
KT-73411Removekapt.use.k2property and code which allows to use K2 with K1 kaptKT-79138K2: KAPT Java Stub Gen:Unresolved referencewith@kotlin.Metadata in Java in 2.2.0KT-79641Kapt: too much information is printed in verbose modeKT-79305K2 kapt: ISE "Cannot evaluate IR expression in annotation" on typealias with unresolved expansionKT-79136K2 kapt: unresolved nested class references in annotation arguments are generated without outer class namesKT-79133K2 kapt: class literal with typealias is not expanded
Tools. Performance benchmarks
KT-79709Add-Xdetailed-perfCLI flag to control verbosity of performance logsKT-79226[K/N] Add performance measurement for native backend lowerings
Tools. Statistics (FUS)
KT-77407Add performance measurement for prefix loweringsKT-79455[FUS] Collect KSP plugin versionKT-79090Integrate dynamic stats intoMarkdownReportRenderer