Changelog
Analysis API. FIR
New Features
KT-78090Implement stubs support for new conditional returns and holdsIn contracts
Fixes
KT-82948'FirRegularClass' expected as a containing declaration, got 'FirTypeAliasImpl'KT-83467Package-level JSpecify annotations are ignored when coming from jars or librariesKT-82057K2. Cannot infer type parameter 'R' in Ktor routing post() function with explicit response typeKT-82846AA: unresolved KtExpression.expressionType for the reference to the parameter with default valueKT-80485False positive UNRESOLVED_REFERENCE on nested interface from super-super class in the super type position inside an anonymous objectKT-82772Flaky false positive deprecation warning on PersistentMap.put in Kotlin repo in IDE modeKT-76487StdLibSourcesLazyDeclarationResolveTestGenerated.testWrappedInt is unstableKT-82618Various tests are failing with NPE in kt-master after updating the compiler on 19.11.25KT-82076Error querying members of JavaClass created for SymbolLightClassForAnnotationClass during library analysisKT-71596Include Js/Wasi checkers in AbstractLLFirDiagnosticsCollectorKT-82085No OUTER_CLASS_ARGUMENTS_REQUIRED on type parameter bound in IDEKT-81873Provide a way of including traces in phase JFR eventsKT-71929Consider leaving the non-post-compute version at EnhancementSymbolsCache.enhancedFunctions
Analysis API. Infrastructure
KT-83173Analysis API Tests: Library names with RC versions aren't sanitisedKT-65140LL FIR: Implement AbstractFirPsiJsDiagnosticTest for LL FIRKT-82212[Analysis API, LL FIR] Implement AbstractDiagnosticsFirWasmTest and AbstractDiagnosticsFirWasmWasiTest for LL FIR
Analysis API. Light Classes
KT-82227Value classes should expose regular static methods
Analysis API. PSI
KT-81710'KtTypeReference.getTypeText' does not account for 'suspend' modifier on suspend lambdasKT-82258Prepare PSI for migration from context receivers to context parametersKT-81074KDoc: List rendering is broken
Analysis API. Providers and Caches
KT-82449K2 IDE Analysis Freezes During Gradle Sync (Recursive Module Dependency Computation in KotlinModuleDependentsProviderBase.computeTransitiveDependents)KT-82629'collectDiagnostics' returns stale syntax error after editor fixKT-74907Analysis API: Apply platform-based library module content restrictions consistently
Analysis API. Standalone
KT-81107AA: KtSourceModuleBuilder.sourceRoots doesn't works with symbolic links
Analysis API. Stubs and Decompilation
KT-82792Stub for KtValueArgumentList inside KtAnnotationEntry should be present if it is present in psiKT-82527TypeClsStubBuilder.createFunctionTypeStub throws NullPointerExceptionKT-82558Deserialized DNN type should have a fully qualified AnyKT-81928KaArrayAnnotationValueImpl.values missing first elementKT-82139Support contracts for property accessorsKT-82198Support context parameters in contracts
Analysis API. Surface
New Features
KT-82851Property accessors should inherit KDoc from the parent propertyKT-63339Analysis API: Provide a way to extract KDoc for symbolsKT-79070KaTypeProvider: add API to build a default type with star projectionsKT-66566AA: api to create functional typesKT-66043KtTypeCreator doesn't provide a way for creating annotated types
Performance Improvements
KT-83694Provide psi-based implementation ofKaDeclarationSymbol#isExternalKT-70868KaSymbol: support PSI-only visibility and modality for the case without compiler pluginsKT-81627KaFirSymbolDeclarationOverridesProvider#processOverrides should process only relevant declarations
Fixes
KT-83152[Analysis API, KDoc] Make class name links on constructors point to the classKT-83695DeprecateKaSymbolInformationProvider#{getter, setter}DeprecationStatusKT-82853Add a convenience property for testing declarations for effective external-nessKT-83226Support "Collection literals" in the Analysis APIKT-83225Support "@IntroduceAt" in the Analysis APIKT-83222Support "Improve use-site defaulting for annotations" in the Analysis APIKT-83351Rename KaSession context parameter from 's' in bridges to something nicerKT-83199Clarify API around extension pointsKT-83074Inner enum entry class has incorrect default visibilityKT-82442Add Ka prefix to org.jetbrains.kotlin.analysis.api.symbols.AdditionalKDocResolutionProviderKT-82443Add Ka prefix to org.jetbrains.kotlin.analysis.api.symbols.DebugSymbolRendererKT-82441Add Ka prefix to org.jetbrains.kotlin.analysis.api.compile.CodeFragmentCapturedValueKT-82439Add Ka prefix to org.jetbrains.kotlin.analysis.api.components.DebuggerExtensionKT-82438Add Ka prefix to org.jetbrains.kotlin.analysis.api.components.DefaultTypeClassIdsKT-68577asPsiTypeandmapTypeToJvmType: leading delimiter for class in a root packageKT-81734MIssing "ARGUMENT_TYPE_MISMATCH" caused by self-referential generic typeKT-82856Redesign KotlinReferenceProviderContributor to make it extensibleKT-82615ClarifyKtReference#resolvesByNamescontractKT-82534No expected type for property accessor without bodyKT-82406Add a test to ensure that all top-level classes in the Analysis API Surface haveKaprefixKT-78397investigate if there is a need in Extra support for the "various little features in contracts"KT-74009Analysis API: Expose "isOverloadable" check for callable symbols similar to "OverloadChecker.isOverloadable"KT-78399Check return value - check how we see from Java(+Stub) we see “annotated” signaturesKT-80357[Analysis API]KaType.enhancedTypedoesn't enhance type parametersKT-73659Analysis API: The name ofKaType.enhancedTypeis too generalKT-80545[Analysis API] DeprecateKaFunctionType.arityKT-77708K2 Mode: Potentially redundant smart cast highlighing when passing smartcasted expressions as argumentsKT-81264K2 AA:KaValueParameterSymbol.hasDefaultValueis false for overriding or actual functionsKT-81166Forbid the usage of KaSessionComponent implementation types directlyKT-74801Analysis API: Publish/subscribe to modification events with a single message bus topic
Backend. Native. Debug
KT-81741Native: stepping into data class hashCode in lldb goes to line 1
Backend. Wasm
New Features
KT-81485[Wasm] DebuggerCustomFormatters generation support for single module modeKT-81483[Wasm] Typescript generation support for single module modeKT-81484[Wasm] Dwarf generation support for single module mode
Performance Improvements
KT-83839K/Wasm: CMP. Load time on Safari significantly increased with Kotlin = 2.3.20-Beta1KT-81524Unnecessary Any-JsAny conversions are generated for external instanceofs
Fixes
KT-82732K/Wasm runtime crash when using fun reference: convertKotlinClosureToJsClosureKT-82649K/Wasm: Rewrite StringBuilder to use JsStringKT-73240K/Wasm: consider using JS String Builtins proposal in String implementation for wasm-js targetKT-83995K/Wasm: 2.3.0 -> 2.3.20-Beta1 degradation in arrow testsKT-82309K/Wasm: refactor _initialize functionKT-70075Wasm: "OutOfMemoryError: GC overhead limit exceeded" during testsKT-83046K/Wasm: don't use StringBuilder implicitly for string concatenationsKT-82645K/Wasm: wasmJs use js "String" for number2String conversionKT-79937K/Wasm: support kotlin.js.nativeInvoke annotationKT-67461Use new lowering phase creation API in Wasm backendKT-83664Wasm: Colon and space are not sanitized in output file namesKT-65779JsExport declaration name clashKT-82202[Wasm] SourceMap generation support for single module modeKT-82162[Wasm] Run single module tests with standalone vm'sKT-81325[Wasm] Remove string pool initialiser dependent codeKT-73238K/Wasm: stop using linear memory inside our codeKT-83025Wasm: Compose application is not loadingKT-73239K/Wasm: use JS String Builtins proposal to transfer strings to and from JSKT-83194K/Wasm: create WasmIR test infrastructureKT-65234K/Wasm Ensure that fp operations are aligned with other b-endsKT-81856K/JS/Wasm interop: external instanceofs do not link in singleModule modeKT-81610[Wasm] Add CLI test for performance metrics for klibs->binary scenarioKT-81550Incorrect generation of .wat filesKT-71533K/Wasm + K2: no error on KClass::qualifiedName usages
Compiler
New Features
KT-75736Enable reading/writing annotations in metadata on JVM by defaultKT-79330Implement the first version of inference for Collection LiteralsKT-83401Collection literals: support different types of expected types for CLKT-55548JSR-305: Overload resolution ambiguity: Platform Types vs Kotlin TypesKT-74860Support Unit coercion (incl. fun refs) in unused return value checkerKT-13968Support vertx nullable annotationKT-79656Useorg.jetbrains.annotations.UnmodifiableViewand/ororg.jetbrains.annotations.Unmodifiableto infer read-only types for Java entitiesKT-81684Implement explicit passing of context arguments using named syntax [TEST_ONLY]KT-80492Checkers for operatorofKT-82638Collection literals: resolve to factory functions for standard library classesKT-82467Improve binary and JVM compatibility by generating bridges for abstract interface methodsKT-82655Bridges generated for non-fake overrides shall include annotations from target methodsKT-74223Move Kotlin/Native TestProcessor phase to the first phaseKT-27090Support contracts in getter and setter for top-level extension propertiesKT-74809Support unnamed local variablesKT-45683Allow generics in contract type assertions
Performance Improvements
KT-81974Do not eagerly initialize reflection for KProperty objects for delegated propertiesKT-83697Native: increased bitcode produced with enabled safe castsKT-83036Native: too many casts emitted with -Xgeneric-safe-casts=trueKT-80061Compiler (or IDEA) hangs due to importing large Kotlin reflect functions (e.g. KFunction999999999)KT-68592Investigate performance implications of enabling -Xjvm-default for ir.tree moduleKT-73687Inefficient KtCommonFile#getFileAnnotationListKT-71673Consider making EnhancementSymbolsCache. enhancedFunctions using simple cache
Fixes
KT-84773Annotations not persisted in IR for internal external functionsKT-78783K2: absence of warning for KTLC-284 migrationKT-81553INITIALIZER_TYPE_MISMATCH and ASSIGNMENT_TYPE_MISMATCH is reported on the entire initializerKT-83395Kotlin/Native 2.3.0 iOS release framework fails with Invalid LLVM module (PHI node type mismatch)KT-84620Incorrect optimization of property delegationKT-81567Add a use-site warning if a@DslMarker-marked annotation is used on entities where it is a no-opKT-81700flaky overload resolution behaviors (false-positive errors, different final candidates, compile-time failures)KT-83372compileDebugKotlinAndroid hangs in 2.3.0 with SQLDelightKT-82579Update specificity rule for context parametersKT-83590Some explicit backing fields must still be considered private-to-thisKT-83849False-positive NULLABILITY_MISMATCH_BASED_ON_JAVA_ANNOTATIONS forOptional.orElse(null)callKT-84192"Member overrides different '@Throws' filter from" caused by overriding in different moduleKT-72994K2: Remove resolution to context receiversKT-80247No diagnostic on unresolved type annotation from a dependency in an inferred typeKT-78730Move more LLVM-agnostic code to compiler/ir/backend.native or compiler/ir/backend.commonKT-74051Add a Continuation for tail-call suspend functionsKT-83984Data races around kotlinx.serialization plugin protobuf extensions registrationKT-83317ClassCastException: with cast kotlin.UInt to java.lang.Number when defining constantKT-83031K2: unstable resolution of EnhancedNullability from type-use NotNull in presence of unused codeKT-83824Delegated property in Gradle DSL fails to compileKT-83657[K/N] Pre-codegen inline produces invalid bitcodeKT-81555Kotlin scripts: top-level name-based destructuring with _ = prop fails with “exception while generating code”KT-83314JSpecify@NullMarkedchanges Java equals(Object) to equals(Any?) causing override conflict in Kotlin 2.3KT-83282JvmExposeBoxed: Duplicate annotation interface kotlin.coroutines.jvm.internal.DebugMetadata in class %class%$1 for suspend inline class valueKT-78443Refactor session component initialization for multi-target compilationKT-83427Arguments of plugin-generated annotations are serialized incorrectlyKT-83538OPERATOR_RENAMED_ON_IMPORT is not reported for 'provideDelegate' operatorKT-83537OPERATOR_RENAMED_ON_IMPORT is not reported for 'of' operatorKT-82721Inconsistent explicit backing fields behaviorKT-83589Explicit backing fields don't likely work with intersection overridesKT-81951K2: Another false positive "Assigned value is never read" in composable functionKT-83588Explicit backing field is falsely accessible from a subclass via a substitution overrideKT-82849Collection literals (minor): collection literal should only be resolved to operatorKT-83363VerifyError: "Bad type on operand stack" on multi-line suspending call with default parameter value since API version 2.4KT-83570K2: Resolve problematic IR when referencing Kotlin const from annotation in JavaKT-83362Starting from 2.3 DefaultImpls bridge functions deprecated with the level HIDDEN are no longer syntheticKT-9182Java interoperability: Overload resolution ambiguity on Java's@NotNulland primitivesKT-83633Forbid inline functional context parameters in inline functionsKT-83449compile-time IR failure on smart cast information leaking from capturing closureKT-82375AddATOMIC_REF_WITHOUT_CONSISTENT_IDENTITYwarning for any argument without consistent identityKT-82524Access to a companion that requires opt-in is possible without opt-inKT-83367VolatileFieldsLowering may emit wrong parameter types for atomic intrinsic callsKT-83382K2: Unreachable method exit breaks MUST_BE_INITIALIZED checks for succeeding value declarationsKT-82211False positive SENSELESS_NULL_IN_WHEN with nullable varKT-83157ExplicitBackingFields: "Property with explicit backing field should be final" in 2.3.0KT-83269K2: Wrong types in IR for explicit backing fieldsKT-68606Argument type mismatch, despite being from the same star-projected typeKT-83324Native: problem with loops handling in types computation passKT-83241K2: "NoSuchElementException: List is empty" with top-level destructuring declaration and lambda initializerKT-82277MisleadingInapplicable candidate(s): fun <K> WHEN_CALL(vararg branches: K): Kwhen a when expression branch contains an unresolved referenceKT-80839Get rid of an obsolete -Xcompile-builtins-as-part-of-stdlib flag once previous changes are bootstrappedKT-82900Language Feature EnhancedBridgesGenerationKT-82651Do not generate self-recursive bridges in JVM backendKT-5486Better errors for integers with leading zeroKT-83185Kotlin repeatable annotations are incorrectly deserialized from bytecodeKT-82863@NoInferregression since 2.2.20KT-82376Header mode: Index out of bounds when generating bodies of data classKT-82311Header mode: Error expression when assigning function declaration to a propertyKT-82408Header mode: Java files are not compiled successfullyKT-82378Header mode: Sequence contains no element matching the predicateKT-82407Header mode: Backend Internal error: Exception during IR loweringKT-81763Incorrect comparison result when using elvis ?: with nullable Long valuesKT-83153Properly ignore contract statements in the Return Value CheckerKT-83076Don't reportWRONG_JS_INTEROP_TYPEon expect types during metadata compilationKT-78589"Class does not have member field" caused by delegation from a Java to Kotlin classKT-82640K2: CCE on green codeKT-82684"Don't know how to compile annotation value ERROR_EXPR" on incorrect array literal in annotation default argumentsKT-81948K2: ClassCastException: "java.lang.String cannot be cast to java.lang.Void" when calling@NullableJava functionKT-82788false-positive duplicate JVM class name error in IJ monorepoKT-82841"kotlin.NoWhenBranchMatchedException" inwhenwith!ischeck & non-sealed class in the middle of hierarchyKT-82844"when" with no branches does not evaluate subject (side effects ignored)KT-81625Incorrect empty parameters parsing (comma is highlighted in red)KT-81193K2: SOE fromAbstractTypeApproximator.approximateToSuperTypewith local enum classKT-65059Stack overflow when typechecking an Elvis expression with deeply generic valuesKT-82555@Deprecated(HIDDEN)` objects not skipped when resolving qualifiersKT-82737Leaked type variable in diagnostic when top-level lambda with uninferred type parameter has non-functional expected typeKT-78019Change K1 API deprecation level from Warning to ErrorKT-82683K2: FIR2IR: compile-time JVM codegen failure on an argument of function subtype for a KSuspendFunction parameterKT-82671Do not report ignorability mismatch on override/actualization if the function returns Unit typeKT-82506Misleading compilation warning: "This class is not recommended for use in Kotlin. Use 'java.util.Map' instead"KT-52498Test privateSuperType.kt is failing with caches enabledKT-82336Header mode: Cannot infer argument for type parameter TKT-69326Inference chooses controversial order to fix variablesKT-82545Handle data class with extra components in migration warning for name-based destructuringKT-82303Improve UNSUPPORTED_FEATURE message when compiler argument has a parameterKT-81866K2: False positive ILLEGAL_RESTRICTED_SUSPENDING_FUNCTION_CALL caused by smart-casted@RestrictsSuspensionreceiverKT-13412Improve error message on callable reference with expression of nullable typeKT-82466KotlinIllegalArgumentExceptionWithAttachment when return is used in explicit delegation expressionKT-82454Local types aren't approximated in public declaration typesKT-82487False positive REDUNDANT_VISIBILITY_MODIFIER inside private classKT-82369[K2 REPL] Crash in the serialization plugin backend with "unable to transform declaration"KT-82243Usage of nested type aliases is forbidden despite the feature flagKT-62900K2: Expected expression to be resolved during Fir2IrKT-81941IllegalArgumentException: class org.jetbrains.kotlin.psi.KtValueArgument is not a subtype of class org.jetbrains.kotlin.psi.KtExpression for factory POSITIONED_VALUE_ARGUMENT_FOR_JAVA_ANNOTATIONKT-80741Fix rendering of inner classes with generic outer classesKT-82331Do not propagate context parameters from classes to constructorsKT-77276K2: Wrong scope for annotation arguments for the parameters of a secondary constructor headerKT-77275Inconsistency between scopes for primary/secondary constructor headersKT-15152Improve error message for unresolved reference for delegation specifier and primary constructor callKT-81498Make Kotlin/Native stdlib in distribution reproducibleKT-81408Allow local-variable-target annotations on destructuring declarationsKT-82012Annotations without parentheses on full form of name-based destructuring don't workKT-81915Exception when analysing 'when' expression with annotated expression as a subjectKT-78364Static methods are not generated for companion object JvmStatic property accessors with JvmExposeBoxedKT-81838Prohibit usage of nested type aliases (from lib) for sources with LV < 2.3KT-81357Forbid compilation of code with explicit root_ide_package in CLI modeKT-73138K2: "Assignment type mismatch" when class name is underscore_KT-82169Add quotes to message of WRONG_NUMBER_OF_TYPE_ARGUMENTSKT-78386JvmExposeBoxed (with no name) + JvmOverloads + JvmName produces ambiguityKT-78358Propagated JvmExposeBoxed annotation doesn't copy JvmName argumentKT-81699Move native klib compilation to a separate moduleKT-81692Decouple compilation of Native klib from the Native backendKT-80673Consider forbidding/minimizing usages of ClassId.isLocal and CallableId.isLocalKT-81376False negative UNEXPECTED_TRAILING_LAMBDA_ON_A_NEW_LINE & bad positioningKT-81946false-positive JAVA_CLASS_ON_COMPANION in case of an explicit companion referenceKT-74461K2: Render function types nicelyKT-81875NCDFE: kotlinx/coroutines/internal/intellij/IntellijCoroutines at :compiler:multiplatform-parsing:jvmTestKT-49722Report NOT_YET_SUPPORTED_IN_INLINE for inherited default parameters with inline functionKT-81913Inapplicable candidate when vararg-adaption for callable reference might be used (array parameter)KT-81841Inapplicable candidate when vararg-adaption for callable reference might be used (generic parameter)KT-39697"Cannot infer type parameter" in map with java static or global method referenceKT-81896Improve RedundantCallOfConversionMethod inspection for@UnsafeNumberannotated typealiasesKT-66413Incorrect line mapping in suspendable code before suspend call without parametersKT-80525Update IntelliJ SDK dependency to 251.27812.49KT-81808Setting hasDefaultValue = true in irValueParameter() crashes the compilerKT-78927False positive 'USELESS_JVM_EXPOSE_BOXED'KT-81703Drop obsolete K1 frontend code from Kotlin/NativeKT-81698DecoupleSpecialBackendChecksTraversalfrom Native backendKT-81687Different LightTree and PSI outputs when annotated class-like declaration is used as an expressionKT-81302False positive: Type Mismatch caused by context parameters, lambdas, and genericsKT-81584IAE "Collection contains more than one matching element" in FirElementSerializer on contextual property with same name as primary value class propertyKT-77237JvmExposeBoxed breaks compilation with a secondary constructor with value classKT-81262False positive: Access declaration type exposure: during access to public function class from internal inline declarationKT-80112Kotlin Debugger: “Cannot find local variable” on evaluating default lambda inside inline functionKT-76806K2: AIOOBE in FirEqualityCompatibilityCheckerKT-81693Introduce lightweight versions of KonanConfig and PhaseContextKT-72446K/N: inline function's default values aren't lowered with cachesKT-81521Anonymous function in context parameters breaks parserKT-80853Class reference in context parameters breaks parserKT-81441Missing type checks when class has deeply generic supertypeKT-79116Wrong parameter arguments mapping (compiler skips empty arguments)KT-81422False negative in full-form name-based destructuring: annotations before val/var not rejectedKT-80652K2: USELESS_IS_CHECK is not detected inwhenKT-80049MangleERROR_TYPEs in diagnostics reported to userKT-73786Evaluator: cannot evaluate inline methods with reified parameterKT-75828Store backing field/delegate annotations and extension receiver annotations in metadataKT-74572Context parameters: contracts don't work with context parametersKT-42824FIR: false INAPPLICABLE_CANDIDATE when using in variance on a Java class
Compose compiler
b/481953005,b/481769383Cache stability inference results during sessionb/481735904Fix Compose codegen crash in inline functionb/479646393Add groups to inline functions with two or more inline parametersb/458234821Disable Compose K1 tests on CIb/456948687Force resolution of declarations when looking up SAM functions in FIRb/445426829Add a diagnostic forkeycall with no arguments
IR. Actualizer
KT-82418KMP Separate Compilation: NPE caused by actualization of NsCalendar.getEraKT-82313ACTUAL_ANNOTATION_CONFLICTING_DEFAULT_ARGUMENT_VALUE checks throwconflicting values in expected and actual annotations
IR. Inlining
Fixes
KT-82017[Inliner] Inline function overrides abstract method with default valueKT-80814[IR Inliner] Space: jsBrowserProductionWebpack task failed with HookWebpackErrorKT-83280SplitLibrarySpecialCompatibilityChecksTestinto pure JS and pure Wasm testsKT-81766K/N: Recursive inline expect/actual causes StackOverflowErrorKT-80953[Inliner] Eliminate excessive IMPLICIT_CAST after IR Inliner on 2nd stage.KT-79899[IR Inliner] Split single-module tests havinginline funinto filesKT-83148KLIB inliner: Make both "inliner" language features to require Api Version = 2.3KT-80791classFunctionsAndFieldsWithCrossModuleInliner fails per-file with cross-module inlinerKT-80696Can not get instance of singleton 'Obj': No class found for symbolKT-82065IR inliner: Inline function's default value argument may get wrong offsets in a temporary variableKT-81753Review diagnosticReporters usage in pre-serialization loweringsKT-80793TestfriendDependencyWithCrossModuleInlinerfails per-file with cross-module inlinerKT-80698[IC][WASM] Mismatched file statsKT-80697[IC][JS per file] Mismatched rebuilt modulesKT-80660[Inliner] Bodyless functions should not be inlined at 1st compilation stageKT-79064Try to get rid ofTypeOfPostProcessor
IR. Interpreter
KT-82161Enable Enum.name and KCallable.name to constant evaluationKT-80646Enable unsigned conversion functions when bootstrapped compiler is available
IR. Tree
KT-82765Kotlin/Native: Internal compiler error when building DFGKT-82829IR deserializer: Don't deserialize any cinterop fake overrides from KlibsKT-83236PeopleInSpace_mpp compilation error: The symbol table has been sealedKT-81154[IrValidator] Fine-tune IrVisibilityChecker on 2nd stageKT-80243Support Name Based Destructuring in loop with withIndex()KT-79436KLIB stdlib symbols loading: Drop all functions from SymbolFinder except for loading the whole collection of (potentially unbound) symbols by nameKT-79435KLIB stdlib symbols loading: Load symbols and and filter/map them lazily in BuiltinSymbolsBase hierarchy when accessed by IRKT-69082Migrate maps of IR elements to IR attributesKT-67457Introduce a way to simplify IR lowering phase creation
JVM. Reflection
New Features
KT-22265Support for inherited annotations
Performance Improvements
KT-84600Performance regression around Kotlin properties JVM reflection during instantiation
Fixes
KT-83608Kotlin-reflect: "Unknown origin of public abstract operator fun invoke(p1: P1, p2: P2): R"KT-57357Reflection: "KotlinReflectionInternalError" when usingcallByon constructor that has inline class parameter with nullable valueKT-83361"KotlinReflectionInternalError: Type parameter not found: 0" on super types with Kotlin 2.3.0KT-42199"KotlinReflectionInternalError: Unknown origin of public abstract operator fun invoke" on function reference to FunctionN.invokeKT-81024Reflection: New KType implementation fails on arguments comparison for a Nothing type parameterKT-83067Reflection: IAE "argument type mismatch" on callBy with vararg of generic type parameter with primitive upper boundKT-82699Reflection: incorrect behavior of KFunction.isExternal for Java native methodsKT-82350Reflection: incorrect behavior of KType.javaType on a type obtained from KType.withNullabilityKT-29203KType.javaType always returns void class for local delegated propertyKT-81899Reflection: incorrect javaType for local delegated property setter return typeKT-82093Reflection: IAE from defaultType for inner class of generic classKT-77312KotlinReflectionInternalError: "Container of deserialized member is not resolved" on computing type parameter captured in a local delegated propertyKT-82316Reflection: type parameters of top-level declarations behave incorrectlyKT-81987Reflection: error when calling function in inline class with inherited default valueKT-81870Reflection: Error when calling function with default parameters and extension receiverKT-81880Reflection: Error when calling function with default & context parametersKT-81907Reflection: incorrect result when calling function with default values and context parametersKT-81859Reflection: do not use descriptors in ValueClassAwareCallerKT-81854Reflection: incorrect type for instance receiver of inner class constructorKT-81855Reflection: IAE "object is not an instance of declaring class" on function with context and extension receiver of inline classKT-81843Reflection: NPE on accessing property accessor returnType for Java fieldKT-81588Reflection: KotlinReflectionInternalError "Inconsistent number of parameters" on calling contextual declaration with value class type in the signatureKT-81111Reflection: suspend function types are loaded incorrectly by the new implementationKT-81206Reflection: non-substituted Function type in suspend function supertypesKT-81804Reflection: remove support for multi-field value classesKT-81664Reflection: IAE "argument type mismatch" on calling member extension with value class in the signature
JavaScript
New Features
KT-83454K/JS: Support ES6 classes in js() callsKT-83455K/JS: Support ES6 default function arguments in js() callsKT-83453K/JS: Support ES6 concise methods in js() callsKT-83457K/JS: Support ES6 spread operators in js() callsKT-83456K/JS: Support ES6 rest function parameters in js() callsKT-54504K/JS: Support ECMAScript tagged string templatesKT-82327KJS: Export parameter names of function types if present in .d.ts filesKT-82371KJS: Generate more concrete TypeScript for members of an uninhabited enum
Performance Improvements
KT-16379KotlinJs - ArrayList get is now slow
Fixes
KT-64951Kotlin-Multiplatform does not allow JSExport of expectKT-83528K/JS: Array holes in array literals are ignored in the new js() parserKT-84134KJS/CMP: "IrLinkageError: Function 'get' can not be called: No function found for symbol"KT-65802How to implement Interfaces in Javascript/Typescript?KT-83830Relocate org.antlr.v4 to an internal packageKT-83572KJS/Wasm: Cannot access@JsModule-declared class from non-modular projectKT-83930Kotlin/JS: JsStatic on property of interface companion generates incorrect d.tsKT-70986Add Swc into the compilation pipeline of Kotlin/JSKT-78742Investigate the usage of the ANTLR-generated parser for thejsfunctionKT-60554KJS: rethink JS_*_NAME_CLASH diagnosticsKT-82552KJS: "Non-abstract class does not implement inherited abstract member from class" errors in generated .d.tsKT-82652KJS: Exported abstract inner classes can be constructed from TypeScriptKT-82542KJS: Inner class can be constructed from TypeScript without passing an outer instanceKT-82499KJS: Omit parameters in private constructors in .d.ts filesKT-41082KJS: 'Reflection is not supported on JavaScript target, so you won't be able to read this annotation in runtime' warning is inconvenient and misleadingKT-82279KJS: DCE removes external members overrides without reasonKT-52800KJS / IR: sealed interface with nested data classes not accessibleKT-67460Use new lowering phase creation API in JS backendKT-82667Kotlin/JS: ESM TypeScript definitions for exported nested Enums do not compileKT-82553KJS: Incorrect .d.ts generated for generic inner classesKT-82263Implement exporting top-level properties in Analysis API-based TypeScript ExportKT-82362KJS: Incorrect types generated in .d.ts for JsName-annotated enum entryKT-82262Implement exporting top-level functions in Analysis API-based TypeScript ExportKT-82144K/JS: 'meta' identifier usage in js() inline calls prevents expression from parsingKT-82149K/JS:newcalls without arguments produce exceptions in js() inline callsKT-81730Optimize suspend functions compilations via JS generatorsKT-79243[JS] Drop K1-specific tests, testrunners and test directives
Klibs
New Features
KT-83101Implement experimental KLib ABI dump parser
Fixes
KT-82586Export in previous version (JS, Wasm): adjust the checker for incompatible Kotlin stdlib/compiler pairsKT-84273[Klib] Added IrOffsetsChecker broke backward klib compatibilityKT-80910[Klib] Ensure serialized source coordinates are correctKT-81955[JS] Support testing of forward compatibility with export in previous versionKT-81957[JS] Create a common Gradle test taskKT-82736False positiveIR_PRIVATE_CALLABLE_REFERENCED_BY_NON_PRIVATE_INLINE_FUNCTION_ERRORon referenece to local declarationKT-82758[PL] Change the behavior of getting name of removed propertyKT-81470Simplify inline function deserialization after the bootstrap updateKT-81466Enable KlibAnnotationsInMetadata by default in LV 2.5KT-82208K/Wasm: allow using newer stdlib with older compilerKT-83328kotlin-wasm-benchmarks: Compilation errors due to missing KLIB dependenciesKT-83071Failure on Native NightlyKT-78365[PL] Change the behavior of getting name of removed functionKT-81977Klib compatibility tests: Implement sanity checksKT-81410Klib metadata: migrate to using the common annotations instead of klib-specific extensions in kotlinx-metadata-klibKT-82577Don't use KLIB resolver in the KLIB toolKT-82213IR linker doesn't complain when a private value class constructor is used from another moduleKT-81003KLIBs: Eliminate excessive implicit casts in common prefix on the 1st stageKT-81670K/N: Many Section still use none cacheable zip when Xklib-zip-file-accessor-cache-limit flag setKT-81954[JS] All forward compatibility tests failKT-81709[KLIB Reproducibility] KLIB zip file generation is non-deterministic due to unsorted file system traversalKT-81474[Tests][Klibs] Migrate Klib evolution tests to PL tests engine
Language Design
KT-83009Exposing of non-exportable API from interfacesKT-73502Context parameters: it is not possible to declare local function with a context
Libraries
New Features
KT-81997Method to create a detached copy of a Map entryKT-79093Expose FirResolvedStatus.hasMustUseReturnValue in kotlin-metadata
Performance Improvements
KT-75801Optimize Array to list conversion using array copy instead of a loopKT-82038K/N: iterating over Array.asList is slower compared to ArrayList
Fixes
KT-78115Investigate the current situation with 22kotlin.contextstandard library overloadsKT-82363AddassertIsto the list of ignorable functionsKT-80666K/N and K/Wasm: Regex: unassigned category is excluded from other charsKT-80665K/N and K/Wasm: Regex: unicode category Symbol matches some punctuation marksKT-78089K/N: Regex: Quantified groups matching is causing a stack overflowKT-82783HashMap (K/N, Wasm), MapBuilder (all targets) duplicate keysKT-52400Deprecate@BuilderInferenceKT-80786Annotate kotlin-stdlib-jdk7/8 with@IgnorableReturnValueKT-83181Remove@IgnorableReturnValuefrom contract DSL functionsKT-82033Array<Array>.flatten fails with obscure error when total length exceeds List's size limitKT-83290Remove unnecessary ExperimentalTime annotation from Uuid functionsKT-83026Specify compareTo behavior for BooleanKT-82868Restore accidentally deleted JS-specific note in ArrayList documentationKT-81563Document kotlin.collections.HashMap and HashSetKT-81562Document kotlin.collections.ArrayListKT-60535Mark SubclassOptInRequired and RequiresOptIn with MustBeDocumentedKT-64649Add explanation to "A compileOnly dependency is used in the Kotlin/Native target" warning message
Native
KT-83542Switch the default GC back to PMCS in 2.3.20-RCKT-82387Kotlin <-> Xcode compatibility issueKT-75806KN Compiler with debug build can not produce executable with debug infoKT-81828Update exception messages regarding disabling native cacheKT-81495Consider making Kotlin/Native distribution compiler cache reproducibleKT-81501Make Kotlin/Native distribution runtime .bc and fingerprint reproducibleKT-80790'Argument list too long' error when using dynamic_cachesKT-48566ExceptionInInitializerError when configuring Gradle project with kotlin-multiplatform plugin on a host unsupported by Kotlin/Native
Native. Build Infrastructure
KT-82886KonanTarget's clinit causes deadlockKT-81345Temporary turned off Swift Export execution testsKT-80869Extract per-module test generators for Native testsKT-82028Kotlin/Native: move runtime building flags to runtime building codeKT-81500Make Kotlin/Native distribution shared libraries reproducibleKT-72011Kotlin/Native: consider building platform libraries with bootstrap compilerKT-81666Kotlin/Native: build stdlib with the bootstrap compiler
Native. C and ObjC Import
KT-79741Native: implement type checking against Objective-C protocols withoutprotocolGetterKT-83039Native: mark header-defined functions and globals unavailable with-Xccall-mode directKT-82200Native: implement type checking against Objective-C protocols withobjc_runtime_namewithoutprotocolGetterKT-82669Kotlin/Native: cinterop tests failure with no class for metaclassKT-79742Native: import C global variables without C wrappersKT-81937Native: switch cinterop to-Xccall-mode bothby default for custom cinterop klibsKT-81548Native: compiler doesn't sanitize CCall.Direct symbol names in C stubsKT-81538Native: InteropBridgesNameInventor doesn't handle legitimate '$' characters in function namesKT-81017Native: compiler can't call CCall.Direct with '$' in the symbol name
Native. ObjC Export
KT-82160K/N: bridge for fake override is not built but requestedKT-83736Objective-C export withobjcExportBlockExplicitParameterNamesgenerates invalid block signature when lambda parameter is namedidKT-83014Native: experimental support for generating an NS_ENUM in addition to an Objective-C class for Kotlin classesKT-76637ObjCExport: K1 + K2 integration test
Native. Runtime
KT-82077Kotlin/Native: in runtime make main module depend on mm module
Native. Runtime. Memory
KT-82635Enable CMS GC by default in 2.3.20-Beta1KT-83470Potential race condition in TryRequestThreadsSuspension due to initialization orderKT-83549Provide an experimental Platform property which returns information about object allocation modeKT-83535Typo in out-of-memory error messageKT-81152Kotlin/Native: deprecate isMemoryLeakCheckerActiveKT-81156Kotlin/Native: deprecate forceCheckedShutdown
Native. Swift Export
New Features
KT-82908Swift Export: bridges for FT should be recursive
Fixes
KT-82054Swift Export:private setis ignored by swift exportKT-83499Swift Export: trampoulines w/ varargs results in a broken swift codeKT-83655Typealias to a closure receiving a closure results in broken swift codeKT-82053Swift Export: Returning generic on top level function produces uncompilable codeKT-80971Swift Export: Support exception throwingKT-83141Swift Export: suspendable covariant functional typeKT-82907Swift Export: attributes are not printed for parameters of closuresKT-80970Swift Export: Support cancellationKT-82726Swift Export: filters out wrong module for coroutinesKT-81591Custom type translation rules in Swift exportKT-81270K/N - Build fails when exposing suspend functions
Tools. BCV
KT-80938Binary compatibility validation: can't exclude container types of Repeatable annotations byfilters.excluded.byNamesKT-83484Create fat-jar artifact for abi-tools [ABI Validation]KT-80747Refactor API of ABI tools [ABI Tools]
Tools. Build Tools API
New Features
KT-80681BTA: introduce a special argument for passing compiler pluginsKT-80338Kotlin CRI generationKT-78198BTA: implement basic metrics collectionKT-79975BTA: add ability to cancel build operationsKT-81790[BTA] Make build operations and configuration immutable after executeKT-82702BTA: Allow collecting compiler lookups in non-incremental modeKT-81847Add CRI <-> BTA integrationKT-81845Add CRI <-> Maven integration
Fixes
KT-84577BTA: API 2.3.20 incompatible with compiler 2.3.10KT-82682BTA: reading non-nullable arguments may return null or throw NPEKT-81729BTA: loading from a classloader without implementation fails with CNFE instead of error with explanationKT-83971BTA: OperationCancelledException cannot be thrown properly from isolated classloaderKT-82167Add BuildTimeMetric for the CRI data generationKT-81846Add FUS for CRI usage in Gradle / MavenKT-82399[BTA] JvmClasspathSnapshottingOperationImpl doesn't use Option defaultsKT-82039BuildEvent compilation error missing with KGP 2.3.0-Beta1KT-81887Implement the CRI lookup data generationKT-81886Implement the CRI data serializationKT-81780Add Gradle <-> CRI integration testsKT-81645BTA prints unreadable version in "option available only since" error (shows KotlinReleaseVersion@hashinstead of 2.x.y)
Tools. CLI
KT-83044Report redundant CLI arguments when they have no effectKT-83202Report all errors during parsing CLI arguments instead of a single oneKT-73320Migrate the main JS CLI pipeline to the phased structureKT-81898Introduce a CLI option to disable source file sortingKT-73606Provide a unified interface for managing the reporting of compiler warningsKT-48419Using a@RequiresOptInAPI that does not exist should have an option to not output a warningKT-81861Introduce a mechanism that allows suppressing CLI diagnosticsKT-82321KMP Separate Compilation: Common fragments are missing forward declaration symbol providersKT-81551Introduce an experimental CLI option for enabling local type aliasesKT-74196Remove patched copy of com.intellij.util.lang.JavaVersion from the Kotlin repo
Tools. CLI. Native
KT-64509Refactor Kotlin/Native compiler setup: run FE without KonanConfig
Tools. Compiler Plugin API
KT-83823DeprecatePreprocessedVirtualFileFactoryExtensionKT-82809[FIR][IC] New containingFileName parameter API is not actually compatible with ICKT-46709IR plugin lookups don't work as expected for expect class with actual typealiasKT-82518Disable automatic body generation of the plugin-generated callablesKT-82159[FIR] Automatically add expressions to properties or functionsKT-58886K2: compiler plugin generated top level declarations cause AssertionError on K/JS and K/Native
Tools. Compiler Plugins
New Features
KT-71893Support@Builderlombok annotation on methodsKT-28594Add a 'jpa' pre-defined flavor to the allOpen compiler plugin.KT-81604Lombok Kotlin compiler plugin and -Werror: Unable to ignore warning for the plugin appliance
Fixes
KT-83119Lombok. canEqual is not available from kotlin for a class with@DataannotationKT-83334Lombok. Builder function is unavailable for a generic classKT-83063Lombok: Setter/getter is not available with a protected access levelKT-83217Lombok. With method is available for the static fieldKT-83120Lombok. A constructor is available for a class with an existing constructor and@Data/@ValueannotationKT-83256Lombok. Setter is available for non-final fields if@Valueand@Data/@Setterare used togetherKT-83251Lombok. Constructor from@Valueincludes fields that are initialized in declarationKT-83252Lombok. Class marked with@Valueisn't finalKT-83085Lombok: getter/setter is available for a static field if class is annotatedKT-83078Lombok: getter and setter are not available for a static Java fieldKT-82341Migrate official compiler plugins to IC-safe reference... API
Tools. Compiler plugins. Compose
KT-84218[2.3.20-Beta1] "IllegalStateException: no implementation for FUN MISSING_DECLARATION" during bitcode loweringKT-84055Reference to lambda in lambda in function 'TextField' can not be evaluated
Tools. Compiler plugins. Serialization
KT-82351Migrate kotlinx.serialization to IC-safe reference... APIKT-76949Serialization: "IllegalStateException: Serializer for element of type kotlin.Any has not been found" on custom serializer forMap<String, Any?>KT-73107Serialization: "IllegalStateException: Serializer for element of type kotlin.Any? has not been found" with star projection
Tools. Gradle
New Features
KT-79389Add allopen plugin + JPA preset to kotlin.plugin.jpaKT-78200Gradle: enable JVM compilation through BTA by defaultKT-81844Add CRI <-> Gradle integration
Performance Improvements
KT-84152Memory Leak and OOM Errors in Kotlin Gradle Plugin 2.3.20-Beta2 within-processexecution mode
Fixes
KT-80186Remove usage of deprecated Gradle API Project.container(...)KT-78754KGP: Remove usages of isVisible/setVisibleKT-80356Compatibility with Gradle 9.2.0 releaseKT-78763Compatibility with Gradle 9.1.0 releaseKT-83316[BTA] Build Reports missing information when JVM compilation uses Build Tools APIKT-82885Run tests against Gradle 9.3.0KT-83125Deprecate out-of-process compilation modeKT-82323Deprecate LanguageSettings.enableLanguageFeature DSLKT-83323Run integration tests against Gradle 9.2KT-82884Compile against Gradle API 9.3.0KT-78104Deprecate CleanableStore infrastructureKT-80096Strange "Inconsistent JVM Target Compatibility" warningKT-82715Declaring dependencies using multi-string notation has been deprecatedKT-83161CRI: it is not clear that CRI generation requires BTA being enabledKT-82717Specifying 'org.gradle.java.installations.auto-detect' as a project property on the command line has been deprecatedKT-81830Create autogenerated kotlin version constants to be used with disableNativeCache DSLKT-83322Compile against Gradle 9.2 APIKT-81831Verify Problems API implementation with Gradle guidelinesKT-80120Support colored value for --console command in Gradle 9.1KT-81400ToolingDiagnosticFactory: check if documentationLink set multiple timesKT-83070The KGP api reference is missing a descriptionKT-82459Improve iOS simulator boot implementationKT-80008Track cross compilation status from project dependenciesKT-78764Compile against Gradle 9.1 API
Tools. Gradle. BCV
KT-80674Rename tasks to avoid usinglegacyword [ABI Validation]KT-80614Add dependency on abi check from gradle's check task [ABI Validation]KT-80827Delete DSL for working with dump variants [ABI Validation]KT-80823Stabilize DSL for filtering [ABI Validation]
Tools. Gradle. Cocoapods
KT-80641EXECUTABLE_DEBUG_DYLIB_PATH problemKT-80644Cocoapod plugin builds a synthetic project for "generic/platform=iOS Simulator"
Tools. Gradle. JS
KT-84772Bundled yarn.lock for kotlinWasmToolingSetup does not include@swc/helpers@0.5.17KT-82946Js, Wasm: Upgrade NPM dependencies
Tools. Gradle. Multiplatform
New Features
KT-77258Query status of cross-compilation or compilation taskKT-81849Replace kotlin-test-common and kotlin-test-annotations-common with just kotlin-test
Fixes
KT-83917compileCommonMainKotlinMetadata fails in CMP core repository with Kotlin 2.3.20-Beta1KT-82090Kotlin JVM + Android Shared Source set fails Import with the Project Isolation enabledKT-81973NPE with Cannot invoke "java.util.List.get(int)" because "path" is null in KMP + Android projectKT-79257Consider deprecating and removing kotlin.kmp.isolated-projects.supportKT-81944Legacy KMP Android uses wrong configurations to infer common dependenciesKT-83687Revert deprecation of 'androidTarget' for AGP lower than 9KT-81536"Couldn't resolve dependency in 'commonMain' for all target platforms" in 2.2.20-Beta2KT-81724IntelliJ successfully resolves imports that are not actually available in the given moduleKT-79073compileTest* tasks pass separateCompilation parameters but don't behave accordinglyKT-71130Enable Isolated Projects support by default for KMP
Tools. Gradle. Native
KT-84759iosX64 should not be marked as deprecated in Kotlin Gradle DSLKT-83598KotlinNativeDownloadTask build caching is unsafeKT-80715Deprecatekotlin.native.cacheKindand introduce DSL insteadKT-83353DisableNativeCache breaks up-to-date checks for non-cacheable K/N targetsKT-81443ConfigurationCacheErroron Linux arm64 due to disabled iOS targetsKT-82970Warning about disabled K/N caches for non-cacheable targets is printed twiceKT-82786Warning about disabled K/N caches is displayed twice
Tools. Gradle. Swift Export
KT-82727Swift Export: generated kotlin bridges don't see neighboring modules
Tools. Gradle. Wasm
KT-82525K/Wasm: kotlinToolingSetup does not depend on package manager installation
Tools. Incremental Compile
KT-80483Incorporate IC lookups intoreference...methods ofIrPluginContext
Tools. JPS
KT-76927Switching from VAL to VAR does not trigger recompilation of usage in Kotlin-uses-KotlinKT-79362JPS/NoArg: Failed to build project with 'java.lang.NoClassDefFoundError: org/jetbrains/kotlin/com/intellij/psi/PsiElement'
Tools. Kapt
KT-81691K2: KAPT: "ClassCastException: IrErrorTypeImpl cannot be cast to class IrSimpleType"KT-82338K2 KAPT: ISE "Cannot evaluate IR expression in annotation" on unresolved enum usage
Tools. Maven
KT-83565Maven: auto‑detect src/main|test/kotlinKT-79304Maven: Automatically add kotlin-stdlib dependencyKT-83111Add JavaVersion argument resolver for kotlin-maven-plugin-testKT-83112Add MavenVersion argument resolver for kotlin-maven-plugin-test
Tools. REPL
KT-82575[K2 REPL] Redesign frontend resolution for REPL snippetsKT-82741[K2 Repl] OOM inFirJavaElementFinderKt.collectAllDependentSourceSessionsTowhen rerunning the same cell multiple times
Tools. Scripts
KT-81679Script explain: while loop explanation may lead to the hanging codeKT-81677Script explain: Contents of the if/when branches are not explainedKT-67063LauncherReplTest flaky on Windows