Kotlin 2.2.0-Beta1
Pre-release
      Pre-release
    
        Changelog
Analysis API
KT-75880K2 Mode: Typealias reference resolves to the underlying class in KMP projectKT-74246KaVisibilityChecker.isVisible is inefficient with multiple calls on the same use-siteKT-57733Analysis API: Use optimizedModuleWithDependenciesScopes in combined symbol providers
Analysis API. Code Compilation
KT-75502K2: IDEA hangs when evaluating inside kotlin-stdlib modules in the Kotlin projectKT-73077Evaluation of inline functions is broken inside Kotlin project and Amper module in Idea sourcesKT-73936K2: CyclicInlineDependencyException: Inline functions have a cyclic dependency in evaluatorKT-74582InterpreterMethodNotFoundError when trying to evaluate simple expressions after recent fixesKT-74524Compilation exception with incorrect JvmName annotation argumentsKT-74443Compilation peer collector ignores inline property accessors
Analysis API. FIR
Performance Improvements
KT-75790Experiment with increasing DEFAULT_LOCKING_INTERVAL timeKT-72159LLFirCompilerRequiredAnnotationsTargetResolver: consider rewriting it to use honest jumping locks
Fixes
KT-72908K2 Analysis API: "FirDeclaration was not found for class org.jetbrains.kotlin.psi.KtFunctionLiteral" with non-local destructuring declaration without initializer beforeinitblockKT-75532ContextCollector: scope for an anonymous function type parameter contains regular parametersKT-74508FirElementBuilder#findElementInsideshould reuse logic fromKtToFirMapping#getFirKT-73066[LL] Enable low-level-api-fir-native even with the disabled native partKT-75132Investigate failures of sandbox diagnostic testKT-75130Set up LL FIR tests for sandbox test dataKT-73386Standardize LL FIR test for compiler test dataKT-75125ISE βValue classes cannot have 0 fieldsβ on instantiating inline class without fieldsKT-75179ContextCollector: support error propertiesKT-74632K2: ISE FirLazyDelegatedConstructorCall should be calculated before accessingKT-73493Support context parametersKT-73183Support context parameters in ContextCollectorVisitorKT-60350K2 IDE: top level destructuring RHS should be resolvableKT-74794K2: FirLazyExpression should be calculated before accessing with context parameter and implicit return typeKT-72938Get rid of KaFirAnnotationListForReceiverParameterKT-73727Exception in implicit type resolution
Analysis API. Infrastructure
KT-74917[Analysis API, Test Framework] Introduce a way to acquirePsiFilefor a givenTestFileinKtTestModule
Analysis API. Light Classes
KT-75391Reduce the amount of psi-based logic in light classesKT-70001SLC adds@Overridewith zero text offset onoverridememberKT-75755K2. False positive red code on vararg parameters in Kotlin class with@JvmOverloadswhen called from JavaKT-75397Constructors and functions with non-last vararg parameters are treated as varargsKT-73405Get rid of KtElement#{symbolPointer, symbolPointerOfType} API usagesKT-74868Support context parametersKT-74733SymbolPsiLiteral.text == value for Java constantKT-74620Delegated functions with value classes are present in light classesKT-74595Static functions with value classes are present in light classesKT-74284Synthetic data class methods using value class types present in LC
Analysis API. Providers and Caches
KT-74090Analysis API: Support dumb mode (restricted analysis)KT-74943Analysis API: ReplaceKotlinGlobalModificationServicewith simpler global modification event publishing and listener-based modification trackersKT-70518K2: Analysis API: Access indices outside ofConcurrentMapcomputation in symbol providersKT-62115Analysis API: Package providers are not cached per search scopeKT-74302Analysis API:LLFirProvidershould disregard self-declarations ingetFirClassifierBy*KT-74463Analysis API:LLNativeForwardDeclarationsSymbolProviderqueries its cache even when theClassIdcannot represent a native forward declarationKT-67868Analysis API: Improve the architecture ofLLFirKotlinSymbolProviders
Analysis API. Standalone
KT-72810withMultiplatformLightClassSupport is inconvenient in Standalone
Analysis API. Stubs and Decompilation
KT-68484K2 IDE, Analysis API: "We should be able to find a symbol for function" for getting KaType ofIterable<T>.map(transform: (T) -> R)parameter in J2K
Analysis API. Surface
New Features
Performance Improvements
KT-70165Introduce PSI-basedKaSymbols for K2
Fixes
KT-72482"KotlinIllegalArgumentExceptionWithAttachments: Expected all candidates to have same callableId but some of them but was different" on trying to add the importKT-75894Cannot build KaFirJavaFieldSymbol for FirFieldImplKT-75586KaFirPropertyGetterSymbol#isInlineandKaFirPropertySetterSymbol#isInlineis incorrect for accessors with explicit modifierKT-58572Analysis API: Enforcing STATUS resolve in 'KtFirNamedClassOrObjectSymbol.visibility' may cause lazy resolve contract violationKT-72730K2: "Unexpected owner function: KtNamedFunction" on vararg val parameter in functionKT-75574Recognize injected code fragment copiesKT-75573Recognize physical file copies as dangling filesKT-74801Analysis API: Publish/subscribe to modification events with a single message bus topicKT-73290Analysis API: Improve the architecture of content scopes and resolution scopesKT-68901Constructor delegation call receiver missing in fir implementationKT-75115Analysis API: TheJavaModuleResolvercompiler class is leaked to Analysis API platform implementationsKT-75123K2. KaFirNamedFunctionSymbol should contain a receiverKT-72639Support context parameter APIKT-73112AA: FirExpression.toKtReceiverValue should handle context receivers properlyKT-74905Cannot find context receiver in FIR declarationKT-74563createPointeris overloaded not for all implementationsKT-73722Analysis API: Automatically check that the API surface is fully documentedKT-65065ProvideKtTypeReference#getShortTypeText()
Backend. Wasm
KT-59032Support instantiation of annotation classes on WASMKT-74441K/Wasm: incorrect 1e-45.toString()KT-59118WASM: floating point toString inconsistenciesKT-68948Wasm: float from variable is printed with many decimal pointsKT-69107[wasm] Seemingly incorrect rounding
Compiler
New Features
KT-75315Support context-sensitive resolution in the call-argument positionKT-75316Support context-sensitive resolution for expression-position with expected typeKT-71768Enable -Xjvm-default=all-compatibility by default to generate JVM default interface methodsKT-76088Support context-sensitive resolution for annotation argumentsKT-74049Introduce special override rule to allow overriding T! with T & AnyKT-74809Support unnamed local variablesKT-75061Support context-sensitive resolution in type positionKT-74811Prohibit usages of@MustUseValue/@IgnorableValueif RV checker is not enabledKT-74806Implement feature flag for improved unused return value checkerKT-73508Add a warning diagnostic for using kotlin.concurrent.AtomicRefKT-72941ANNOTATIONS_ON_BLOCK_LEVEL_EXPRESSION_ON_THE_SAME_LINE missing in K2KT-74497Warn about incompatible Kotlin and Java targets in annotationsKT-74382Annotating Java record components for@JvmRecorddata classKT-73255Change defaulting rule for annotations
Performance Improvements
KT-75957K2: PsiRawFirBuilder.Visitor#toFirExpression forces AST loading via getSpreadElementKT-74824Exponential performance caused by nested flexible typesKT-62855K2: extra allocation for SAM conversion compared to K1KT-74977K/N: support stack array for Array(size) callKT-74369Exponential compiler memory usage in specific situations with type inference
Fixes
KT-75945Indy: Allow lambdas with annotationsKT-59506Context receivers: Unable to use trailing comma in receiver listKT-4779Generate default methods for implementations in interfacesKT-71792Switch latest stable version in Kotlin project to 2.2KT-74827CompilationErrorException : Could not load module in an attempt to find deserializer when trying to evaluate an expressionKT-74454Support trailing comma in context parametersKT-74337Local Delegated properties don't preserve their annotations and don't show up in reflectionKT-55187Context receivers in function types can have labelsKT-58498Context receivers: ClassCastException with object and extension function in interfaceKT-58165K2: "IllegalArgumentException: No argument for parameter VALUE_PARAMETER" on overridden contextual propertyKT-75535Compilation of typealias does not check for clashesKT-72313K2 IDE / KMP Debugger: Evaluation of inline functions declared in a common source set causes a crashKT-75815Disable warnings about different context parameter names in overridesKT-75483Native: redundant unboxing generated with smart castKT-74421K2: Missing "val can not be assigned" when trying to assign a value to parent's "val"KT-55083JVM: AbstractMethodError caused by lambda with sealed base interface and fun sub interface and overridden methodKT-16727Names for anonymous classes in interfaces are malformed on JDK 8KT-12466NoClassDefFoundError: B$DefaultImpls on super interface call through K-J-K inheritanceKT-75293K2: Missing [HAS_NEXT_FUNCTION_TYPE_MISMATCH] diagnosticsKT-72734Support new callable reference nodes in Kotlin NativeKT-75965The iOS app did not run successfully in Release modeKT-72335KotlinIllegalArgumentExceptionWithAttachments when using illegal selectorKT-71718K2: drop TypePreservingVisibilityWrtHackKT-75969java.lang.IllegalArgumentException: source must not be null on red codeKT-75322ConeDiagnosticToFirDiagnosticKt: source must not be nullKT-73800Wrong method executed on super call in -Xjvm-default=all/all-compatibility with an extraneous super-interfaceKT-38029Wrong method executed on super call in diamond hierarchy with covariant overrideKT-76049K2: drop explicitTypeArgumentIfMadeFlexibleSynthetically creation when DontMakeExplicitJavaTypeArgumentsFlexible is enabledKT-76055K2: drop prepareCustomReturnTypeSubstitutorForFunctionCall logic when DontMakeExplicitJavaTypeArgumentsFlexible is enabledKT-76057K2: don't do reverse Java overridability checks when DontMakeExplicitJavaTypeArgumentsFlexible is enabledKT-75197K2: Missing [COMPARE_TO_TYPE_MISMATCH] diagnosticsKT-75639Inlinecontextfunction leads toClassCastExceptionKT-75677K2: change runtime behavior of KT-75649 case in 2.2KT-75961K2:PsiRawFirBuilder.Visitor#visitSimpleNameExpressionforces AST loading viagetReferencedNameElement().node.textKT-73611Remove -Xextended-compiler-checks in favor of a deprecation cycleKT-67869Make inference for lambda working consistently inside and outside of the callKT-74885K2: IAE "source must not be null" in FirCyclicTypeBoundsCheckerKT-75578K2: False negative [SUPER_CALL_WITH_DEFAULT_PARAMETERS] when calling the upper-class implementation of a method with the default value argumentKT-73954Generate implementations in classes for inherited non-abstract methods in -Xjvm-default=all-compatibilityKT-75173Context parameters: KotlinIllegalArgumentExceptionWithAttachments if you override function with value/extension parameter by fun with contextKT-75742Native: "IllegalArgumentException: unknown pass name '' " when specifying an empty list of LLVM passesKT-74819K2: False-positive overload resolution ambiguity for flatMap inside PCLAKT-75093K2 IDE: "Unreachable code" highlighting range is confusingKT-74572Context parameters: contracts don't work with context parametersKT-74765Move K1 lazy IR implementation from 'ir.tree' to 'psi2ir'KT-71425IR Inliner: investigate return type of an inlined blockKT-74764Native: merge init nodes generated within the same LLVM module for the same klibKT-75561K/N: place InteropLowering after UpgradeCallableReferences phaseKT-73369K/N: move interop lowering up the pipelineKT-75517K2: Refactor FirCallableSymbol.resolvedContextParameters to return symbolsKT-75821K2: REPL resolution doesn't take into account the property type when processing its initializerKT-75705IllegalArgumentException when isInitialized is used with java fieldKT-75334Java target shouldn't be specified if Kotlin target isn't specifiedKT-75157Missing PARAMETER_NAME_CHANGED_ON_OVERRIDE and DIFFERENT_NAMES_FOR_THE_SAME_PARAMETER_IN_SUPERTYPES for context parametersKT-75160Check usages of value parameters in checkers and adapt to context parametersKT-75040UnifysubjectandsubjectVariableinFirWhenExpressionKT-75323FirSyntheticProperty: Unexpected status. Expected is FirResolvedDeclarationStatus, but was FirDeclarationStatusImplKT-75602Introduce concept of shared library session in Fir sessionsKT-75509PARAMETER_NAME_CHANGED_ON_OVERRIDE is reported randomlyKT-75124IAE βclass org.jetbrains.kotlin.psi.KtContextReceiver is not a subtype of class org.jetbrains.kotlin.psi.KtParameter for factory EXPOSED_PARAMETER_TYPEβ on private context receiverKT-73909Add an inspection discouraging usage of kotlin.concurrent Native atomics in favor of the new atomicsKT-73585K2: ABSTRACT_SUPER_CALL is not reportedKT-75531K2 REPL: local name doesn't shadow one from implicit receiverKT-58369K2: enable DFA warningsKT-73359Migrate frontend sources to new IR parameter APIKT-75380K2: Modality is configured incorrectly for some FirDefaultPropertyAccessorKT-75526Regression in K2 scripting: local name doesn't shadow one from the implicit receiverKT-59379K2: Missing MIXING_NAMED_AND_POSITIONED_ARGUMENTSKT-74649Deprecate language versions 1.8 and 1.9KT-75106K2: type parameters of anonymous functions are unresolvedKT-73387Unexpected implicit type during enhancementKT-72618Cannot define operator inc/dec in class contextKT-74546Serialize context parameters to metadataKT-68768K2: unsuccessful inference fork with jspecify annotationsKT-75345Add a test for KT-42271KT-75012K2: Compiler crash ondynamic == nullKT-75195IllegalStateException: No value for annotation parameter when@allmeta-target is used with annotation with constructorKT-75163WRONG_ANNOTATION_TARGET_WITH_USE_SITE_TARGET for@allmeta-target although there are applicable targetsKT-75198@allmeta-target should be forbidden for delegated propertiesKT-74958K2: UNEXPECTED_TRAILING_LAMBDA_ON_A_NEW_LINE isn't reported on accidental trailing closureKT-74982Improve UNSUPPORTED message handlingKT-75111False negative "This declaration needs opt-in" for usage of enum entry with OptIn marker in another moduleKT-74924Infinite recursion in substitution of captured type with recursive supertypeKT-75289NPE: getParent(...) must not be nullKT-74340FIR: folding binary expression chains for psi parserKT-73831Do not choosefieldtarget in annotation classesKT-73494Enable first-only-warn annotation defaulting modeKT-75174K2: incorrect influence of return type nullability on required receiver type in KJK hierarchy with propertyKT-74920Overriding T! with T & Any is not allowed to the extension property receiver typeKT-75150False ambiguous context parameter reported because context is not chosen via generic parameterKT-74965CLI compiler doesn't report syntax errors for JS, Metadata backends if light-tree mode is disabledKT-74303K2 IDE / Kotlin Debugger: AE βTrying to inline an anonymous object which is not part of the public ABIβ on evaluating private inline function with object insideKT-75177NoSuchMethodError on suspend default interface method fake override returning inline class in -Xjvm-default=all-compatibilityKT-74718K/N: Move TestProcessor phase to the top of the pipelineKT-75015Context parameters: it is possible to declare anonymous function with modifiers but they don't have any effectKT-75092K2: Missing errors for modifiers on anonymous function in statement positionKT-75009Context parameters: context is unresolved inside anonymous function if passed as an argumentKT-75017Context parameters: "IllegalStateException: Cannot find variable a: R|kotlin/String| in local storage " when context from another local function is calledKT-75154Context receiver deprecation warning should depend on langauge version, not on LATEST_STABLEKT-74979Context parameters: anonymous functions with a context aren't parsed in complex casesKT-74673K2: ClassCastException when passing suspending functional interface with genericKT-74469K2: False positive: "Argument type mismatch" during Java interopKT-75105K2: False negative NAME_IN_CONSTRAINT_IS_NOT_A_TYPE_PARAMETER for type constraint of anonymous functionKT-74929False positive TYPE_PARAMETER_OF_PROPERTY_NOT_USED_IN_RECEIVER if it is used with T&AnyKT-74227K2: "Cannot infer type for this parameter. Please specify it explicitly" caused by lambda in another lambda with a parameterized function typeKT-74728K2: Java method overriding Kotlin method with receiver loses vararg modifierKT-70789CLI error "mixing legacy and modern plugin arguments is prohibited" on using -Xcompiler-plugin unless default scripting plugin is disabledKT-72829Forbid 'entries' name of enum entry, and deprioritize it in resolveKT-75037K2: IrGeneratedDeclarationsRegistrar.registerFunctionAsMetadataVisible doesn't handle extension receivers and context parametersKT-73149Annotations support for context parametersKT-74798Report error on local contextual propertiesKT-74092Context parameters: it is not possible to declare an anonymous function with a contextKT-52152K2: Investigate suspicious code at SAM conversionsKT-75016K2: BackendException when context var property is declared in interfaceKT-74474K2: Report more precise diagnostic when last expression of non-unit lambda is a statementKT-74478K2: False negative RETURN TYPE_MISMATCH if the last statement of a lambda is indexed assignmentKT-73685K2 IDE / Kotlin Debugger: NSME βMethod not foundβ on evaluating function with constant value in@JvmNameKT-74449Report RETURN_TYPE_MISMATCH instead of ARGUMENT_TYPE_MISMATCH for return expressions in lambdasKT-74918FIR: account for K/Wasm diagnostics in generateNonSuppressibleErrorNamesFileKT-74897K2: Report UNSUPPORTED_FEATURE instead of TOPLEVEL_TYPEALIASES_ONLY for nested type aliasesKT-74963K2: Fir2Ir: Avoid a situation when startOffset > endOffset in generated IrBranchKT-74697Overriding a method that's both deprecated and non-deprecated should not cause warningsKT-74928K2: "IllegalStateException: Cannot find cached type parameter by FIR symbol" in KJK hierarchy with extension propertyKT-74630K2: local class arguments in annotations on types and type parameters are not serializedKT-74445Commonize Native Function/Property reference loweringsKT-74670Warning message CONTEXT_CLASS_OR_CONSTRUCTOR isn't reported for context receiver on the constructorKT-74617Trivial SMAP optimization leads to missing debug info after inlineKT-74812compile-time failure on a callable reference with an input type inferred to an inaccessible generic typeKT-66195K2: Java method is not enhanced from overridden's context receiversKT-74501Context parameters: ABSTRACT_MEMBER_NOT_IMPLEMENTED if fun with context is implemented in Java in KJK hierarchyKT-74385Missing diagnostic on repeated suspend modifier in function typeKT-74749Provide explanation IR before script compilationKT-74751K2: IllegalStateException: Can't apply receivers of FirPropertyAccessExpressionImpl to IrTypeOperatorCallImplKT-74729NPE when suspend lambda has inline class parameterKT-51258Annotations should go before context receiversKT-74336Not supported: class org.jetbrains.kotlin.fir.types.ConeIntersectionTypeKT-74203K2: False negative NO_ELSE_IN_WHEN of a generic type with star projection <*> bounded by a sealed hierarchyKT-63720Coroutine debugger: do not optimise out local variablesKT-48085Kotlin/Native: LLD removes live code with--gc-sectionswhen producing DLLKT-69164Native: use lld from bundled LLVM distribution when compiling on Windows for a MinGW targetKT-74081Context parameters: implicit call resolves to extension when there is a contextKT-74682Implement internal type exposure via parameter bounds deprecation postponementKT-74556K2: "IAE: class KtDestructuringDeclaration is not a subtype of class KtNamedDeclaration for factory REDECLARATION" with two non-local destructuring declarationsKT-73146Context parameters CLI & diagnosticsKT-72722Treat 'copy' calls of a data class as explicit constructor usagesKT-74389K2: False positive NON_EXPORTABLE_TYPE on non-UnitPromise<...>in K/JSKT-72104Consider enabling check for unbound symbols in JVM before loweringsKT-74568Synthetic nested classes missing JVM attributesKT-73703[Native] Move KonanIrLinker toserialization.nativemoduleKT-61175K2: FirReceiverParameter does not extend FirDeclarationKT-73961'lateinit is unnecessary' on transient properties should not be reported for serializable classesKT-73858Compose / iOS: NullPointerException on buildingKT-62953JVM IR: UseSimpleNamedCompilerPhaseinstead ofNamedCompilerPhaseKT-72929Consider caching typealiased constructor symbols created by TypeAliasConstructorsSubstitutingScopeKT-73705[Native] Decouple native caches support from KonanIrLinker and KonanPartialModuleDeserializerKT-74091K2:@JvmOverloads-produced overloads have generated line number tableKT-69754Drop -Xuse-k2 compiler flagKT-73352K2: false negative ARRAY_EQUALITY_OPERATOR_CAN_BE_REPLACED_WITH_EQUALSKT-72962Consider enabling ConsiderForkPointsWhenCheckingContradictions LF earlierKT-73027IllegalStateException: Annotation argument value cannot be null: sinceKT-74242Freeze onrunCatchingcall infinallyblock inside SAM conversionKT-29222FIR: consider folding binary expression chainsKT-73760Cannot implement two Java interfaces with@NotNull-annotated type argument and Kotlin's plain (nullable) type parameterKT-58933Applying suggested signature from WRONG_NULLABILITY_FOR_JAVA_OVERRIDE leads to red codeKT-70507Should parentheses prevent from plus/set operator desugaring?KT-73771K2: Infinite compilation caused by buildList without typeKT-67520Change of behaviour of inline function with safe cast on value typeKT-67518Value classes leak their carrier type implementation details via inliningKT-72305K2: Report error when using synthetic properties in case of mapped collectionsKT-70233Implement a deprecation error for FIELD-targeted annotations on annotation propertiesKT-67517Value class upcast to Any leaks carrier type interfacesKT-72814FIR: don't use function references in FirThisReferenceKT-73153K2: Standalone diagnostics on type arguments are not reportedKT-73011K2: Allow overloads resolution for callable references based on expected type variable with constraintsKT-69223Drop parallel lowering mode in JVM backendKT-7461Forbid using projection modifiers inside top-level Array in annotation's value parameterKT-53804Restore old and incorrect logic of generating InnerClasses attributes for kotlin-stdlibKT-52774Resolve unqualified enum constants based on expected type
Compose compiler
b/401484249Generate a group aroundArrayconstructor callb/400380396Fix missingendMovableGroupcall with early return inkeyfunctionb/400495890Replace function metrics global with an IR attributeb/397855145Fix "Unknown file" error in target annotation inferenceb/274898109Fix off-by-one error when calculating changed arg count for lambdasb/367066334Add diagnostic to restrict@Composableannotation to function types only
IDE
KT-54804Generate synthetic functions for annotations on properties in light classes
IR. Inlining
Fixes
KT-75986Add an option to theDumpIrTreeOptionsto dump IR signature if availableKT-64812Investigate and fix remaining owner usages in inlinerKT-74732IR: Exposure of private type is reported at wrong source locationKT-76007IR deserialization tests w/ enabled IR inliner: undefined offsets in IrInlinedFunctionBlock.inlinedFunctionSymbolKT-74734[Native] Use NativeInliningFacade in new subclass of AbstractFirNativeSerializationTestKT-73985KLIB Synthetic Accessors Dump Format: Include local declarationsKT-72594[JS][Native] Add IrInliningFacade to test runnersKT-74456SerializedIrDumpHandler: Compare IR dumps with source offsetsKT-73624[Native] Implement inlining facadeKT-70370SyntheticAccessorLowering: Turn on mode with narrowing visibility on 1st phase of compilationKT-70452OuterThisInInlineFunctionsSpecialAccessorLowering - run it after inlining of private functionsKT-70451Enable double-inlining in Native & JS backends unconditionally
IR. Interpreter
KT-74581SupportIrRich*Referencein IR interpreter
IR. Tree
Fixes
KT-75679Extract commoninvokeFunctionin IrRichCallableReferenceKT-74799[Native][IR] Excessive FUNCTION_INTERFACE_CLASS after deserializationKT-71138Report error on cross-file IrGetField operations generated by compiler pluginsKT-74331Implement IrElement.copyAttributes as a true attribute map copyKT-75196[IR] Make startOffset and endOffset mutableKT-73206Extract common parts from new IrRichFunctionReference/IrRichPropertyReference nodesKT-73190Migrate common backend sources to new IR parameter APIKT-73225Migratecompiler.ir.serialization.commonto new IR parameter APIKT-73220Migratecompiler.ir.treeto new IR parameter APIKT-75189Add an IR validation for the correspondingPropertySymbolKT-74275Adjust IR dump format for context parameters & new parameter APIKT-74269Drop IrElementVisitor, IrElementVisitorVoid and IrElementTransformer interfacesKT-72739Create a lowering to replace old callable reference nodes with new onesKT-73120Get rid ofIrclassKT-73045Fix inconsistency between shapes of IR calls vs calleeKT-69714[IR] Remove IrErrorDeclarationKT-73609Tests: Implement DeserializerFacade for Kotlin/NativeKT-73813Implement tests for all IR validator checkersKT-73171Choose the approach for testing IR serialization/deserialization wrt IR inlinerKT-73430[IR] Get rid of SymbolFinder usages outside ofSymbolshierarchyKT-74455IR dump: Support dumping source offsetsKT-73433[IR] Get rid of some symbols lookup methods
JavaScript
Performance Improvements
KT-74533K/JS: avoid number to char calls in charSequenceGet intrinsic
Fixes
KT-57192KJS: "Exported declaration uses non-exportable return type" caused by@JsExportPromise with Unit typeKT-73363Migratejs-plain-objectsplugin to new IR parameter APIKT-64927[JS] TypeError when abstract class with override var property extends an exported abstract class with val propertyKT-75606KJS: java.lang.AssertionError: Different declarations with the same signatures were detectedKT-70623Kotlin/JS: Incremental compilation fails when granularity is changedKT-70652Kotlin/JS:@JsExportdoesn't work with granularity per-fileKT-71365KJS. File-level export supportKT-68775Kotlin/JS infinite loop for exception message override that calls super.messageKT-42271K/JS: isInitialized for not-lateinit property isn't marked as error as in JVM projectKT-72437KJS. Invalidcopymethod for inherited JSO with type parametersKT-70664Extending a@JsPlainObjectinterface with a generic type parameter fails with a compile errorKT-74839AssociatedObjectKey metadata doesn't survive incremental compilationKT-71169@JsPlainObjectcopy produces the wrong type when copied property is nullable in parent interfaceKT-71656K2 JS: "IllegalStateException: Class has no primary constructor: kotlin.ULong"
Klibs
Fixes
KT-70146[KLIB Resolve] Don't fail on nonexistent transitive dependencyKT-75624Don't fail on an attempt to deserialize "unknown" IrStatementOrigin and IrDeclarationOriginKT-55808Support metadata version checks for klibs in the compilerKT-56062Support-Xmetadata-versionfor KLIB-based compilersKT-75192KLIB reader tends to extract files from the KLIB archive to a temporary directory even when this is not neededKT-75013Make klib reader more flexible: allow empty directories to be omittedKT-75680KLIB: Drop obsolete IrPerFileLibraryImpl & IrPerFileWriterImplKT-73779[Native] Context parameters: extension receiver is preferred over context parametersKT-65375Clean-up the logic for serialization of error types in metadata and in IRKT-73826DeduplicateIrFileEntrythat is serialized insideIrInlinedFunctionBlockKT-75091Droptargets/$target_name/kotlindirectory from klibsKT-74635KLIBs: Change call serialization scheme to store all arguments in a single listKT-74352API4ABI: Fix representation of context parametersKT-71007Align KLIB ABI version with the language versionKT-73672Bump KLIB ABI version in 2.2.0KT-74080API4ABI: Adapt API for value parameter kindsKT-74396Support context parameters in klibsKT-72931Support new callable reference nodes in KLIB [de]serializer
Language Design
KT-72417Annotation with target RECORD_COMPONENT cannot be used on@JvmRecorddata class componentsKT-73557Allow refining expect declarations for platform groupsKT-54206Support local contextual functionsKT-67977Compile results of annotations assigned to JvmRecord properties as in JavaKT-73502Context parameters: it is not possible to declare local function with a contextKT-73632Expect class redeclaration is allowedKT-70002[LC] Forbid using projection modifiers inside top-level Array in annotation's value parameter
Libraries
KT-75933Update readLine's KDoc to suggest alternative functionsKT-46360Type inference fails to infer type for sumOf call with integer literal: "Overload resolution ambiguity TypeVariable(T)) -> Int / Long"KT-74804Add@MustUseValueand@IgnorableValue/@Discardableto kotlin-stdlibKT-73590Samplify string.splitKT-75759Add the serializer for kotlin.time.Instant to the list of standard serializersKT-71628Review deprecations in stdlib for 2.1KT-73726A link from shuffle's KDoc is not rendered properlyKT-74173The sample code oflazyon stdlib can not run on playground due to "samples" package importKT-50081AbstractList sublist leads to StackOverflowKT-74422KotlinWebsiteSampleRewriter should filter individual imports from samples package
Native
KT-74377Kotlin Native: release executable crashes with error 139KT-70202Xcode 16 Linker fails with SIGBUS
Native. C and ObjC Import
KT-75781Xcode 16.3: Fix cinterop tests failing with fatal error: could not build module '_stdint'KT-75598Native: fix samples/objc testKT-74549Native: replace clang_Type_getNumProtocols/clang_Type_getProtocol with standard libclang functions
Native. Platforms
KT-74702Deprecate Windows 7 support
Native. Runtime
KT-71534Native: Support Latin-1 encoded strings at runtimeKT-67741Kotlin/Native: Unify SpecialRef handling
Native. Runtime. Memory
KT-74432Native: add an option to allocate everything in SingleObjectPageKT-74975Enable CMS by default in Swift exportKT-74831Kotlin/Native: investigate mmap usage in custom allocatorKT-60928Kotlin/Native: refactor allocator codeKT-50291Kotlin/Native: remove dependency of mm on gc implementation
Native. Swift Export
KT-75166Support export of platform libraries types in Swift exportKT-75079Swift export: add dependency from sir-compiler-bridge to Analysis APIKT-72413Swift Export: potential memory leak when best-fitting class is different from the formal typeKT-72107Remove IntoSingleModule stratagy
Reflection
KT-75464Bundle kotlin-metadata-jvm into kotlin-reflectKT-71832kotlin.jvm.internal.ClassReference static overhead is 11,060 bytes
Test Infrastructure
KT-75152Introduce phase checks toPerformanceManagerKT-75987Refine names for jps tests that are shown after running test data helper pluginKT-74254Perform version 2.2 boostrapping and language version updateKT-75194Fix remaining problems of PerformanceManagerKT-75309Add kotlin-compiler-server as K2 user projectKT-75094Introduce NumberAgnosticSanitizer and use it for checking performance dumpsKT-74987Get rid of using PerformanceCounter in CommonCompilerPerformanceManagerKT-74705Remove org/jetbrains/kotlin/utils/intellijUtil.kt file with now obsolete Pair.companion functions
Tools. Ant
KT-73116Deprecate Ant support
Tools. BCV
KT-71168Implement a prototype of ABI Validation in Kotlin Gradle Plugin
Tools. Build Tools API
KT-76060BTA: Java sources passed for IC may fail compilation in non-incremental modeKT-74041Build Tools API: Lower level or remove compiler arguments log
Tools. CLI
KT-74663kotlinc-js CLI: not providing -ir-output-dir results in NullPointerExceptionKT-73606Provide a unified interface for managing the reporting of compiler warningsKT-73007Add stable compiler argument -jvm-default instead of -Xjvm-defaultKT-73595Kapt.use.k2=true is ignored silently for language-version 1.9 or lessKT-18783Option to treat a specific compiler warning as an errorKT-24746Provide ability to exclude specific warnings from compiler option Werror (all warnings as errors)KT-75641kotlinc -help spends almost 1 second on Usage.render()KT-75043Migrate Metadata compilation pipeline to the phased structureKT-75113TEST_ONLY LanguageFeature doesn't abort the compilationKT-73324Use phased CLI infrastructure in JVM tests
Tools. Commonizer
KT-74623Drop metadata version check from KLIB commonizer
Tools. Compiler Plugin API
KT-74640[FIR] Support settingsourcein declaration generators
Tools. Compiler Plugins
Fixes
KT-73367Migrate compose plugin to new IR parameter APIKT-75614PowerAssert: handling of exceptions doesn't work inside assert functionKT-75264PowerAssert: the diagram for try-catch with boolean expressions isn't clearKT-75663PowerAssert: 'contains' result for strings is displayed under the first parameter instead of 'in'KT-73897PowerAssert: Implicit argument detection is brittle in a number of casesKT-74315Kotlin Lombok: "Unresolved reference" on generating@Builderfor static inner class where outer class is also using@BuilderKT-72172File Leak occurring in Kotlin DaemonKT-75159Compose: Missing 'FunctionKeyMeta' annotation on lamdas declared in non-composable functionKT-72877Power-Assert should provide IrExpression transformation APIKT-61584[atomicfu]: prohibit declaration of AtomicReference to the value class in the compiler pluginKT-73871PowerAssert: Comparison via operator overload results in confusing diagramKT-73898PowerAssert: Operator calls with multiple receivers incorrectly alignedKT-73870PowerAssert: Object should not be displayed
Tools. Gradle
New Features
KT-73418Gradle '--warning-mode' value should affect Gradle plugin diagnosticsKT-73285Integrate Gradle Problem API with KGP diagnosticsKT-61649Add Gradle compiler option for jvm-defaultKT-68659Collect reported Kotlin Gradle Plugin diagnostics into one HTML/Text file report instead of writing it to logKT-73906Improve ToolingDiagnostic CLI rendering
Fixes
KT-75107Add Gradle property to use new FIR IC runnerKT-75188Groovy plugin breaks access to internal members of test friendPaths classes in kotlin compilationKT-70252Gradle: remove Intellij dependencies from KGP runtimeKT-75921Make Swift Export available by defaultKT-74333improve ToolingDiagnosticBuilderKT-73683Compile against Gradle API 8.12KT-75187Make KotlinToolingDiagnostics internalKT-75568Do not use env variables registered as CC inputsKT-74277KGP / FreeBSD: "TargetSupportException: Unknown operating system: FreeBSD" during the buildKT-73842Gradle: AGP failing tests with "Failed to calculate the value of property 'generalConfigurationMetrics'" using KGPKT-75262Gradle test-fixtures plugin apply order breaks the projectKT-75277FUS statistics: 'java.lang.IllegalStateException: The value for this property cannot be changed any further' exception is thrown during project importKT-75164Run Gradle incremental compilation tests with FIR runnerKT-59632KotlinCompileTool.setSource() should replace existing sourcesKT-72694Accessing Task.project during execution is being deprecated in Gradle 8.12KT-75026Corrupted NonSynchronizedMetricsContainer in parallel Gradle buildKT-66133Finalize resolution strategy for resources and remove the one that is unusedKT-64991Change deprecation level to error for KotlinCompilation.sourceKT-70620Raise to error deprecation for KotlinCompilationOutput#resourcesDirProviderKT-73849Categorize ToolingDiagnosticsKT-74462Flaky Kotlin Gradle Plugin Tests: IsInIdeaEnvironmentValueSource$Inject not foundKT-72329Consider bumping apiVersion for projects with compatibility setupKT-74415Make composeCompiler.includeSourceInformation true by defaultKT-74772ToolingDiagnostic: title is not displayed on WindowsKT-74485BuildFinishedListenerService is not thread-safeKT-74717Test publication with dependency constraintsKT-74551Improve KGP-IT withDebug for tests with environment variablesKT-74639Executable binaries for JVM test cannot be created unless an additional suffix is set in GroovyKT-72187Gradle tests are using incorrect Kotlin/Native distributionKT-57653Explicit API mode is not enabled when free compiler arguments are specified in Gradle projectKT-51378Gradle 'buildSrc' compilation fails when newer version of Kotlin plugin is added to the build script classpath
Tools. Gradle. Compiler plugins
KT-58009BaseKapt.annotationProcessorOptionProvidersshould be aList<CommandLineArgumentProvider>instead ofList<Any>KT-61928Clarify parameter types in KaptArguments and KaptJavacOption
Tools. Gradle. JS
KT-75863Wasm/JS: Deprecate phantom-js for KarmaKT-75485KJS: "Module not found: Error: Can't resolve 'style-loader' and 'css-loader'" in 2.1.20-RCKT-74869KJS:jsBrowserProductionWebpackdoes not minify output with 2.1.20-Beta2KT-74859Gradle configuration cache issues related to RootPackageJsonTaskKT-70357Remove JS/Dce deprecated Gradle DSL
Tools. Gradle. Multiplatform
New Features
KT-60623DeprecatepublishAllLibraryVariantsin kotlin-android
Fixes
KT-75605Dependency resolution fails in commonTest/nativeTest source sets for KMP module when depending on another project due to missing PSMKT-74727Dependency resolve from a single target KMP module to another kmp module fails on non-found PSMKT-75512Maven-publish: ArtifactId is not correct inpomfile with customizedwithXmlKT-68015Remove legacy KMP flagsKT-71634KGP: Remove KotlinTarget.useDisambiguationClassifierAsSourceSetNamePrefix and overrideDisambiguationClassifierOnIdeImportKT-72203Swift Export: Unclear failure for invalid module nameKT-66542Gradle: JVM target withwithJava()produces a deprecation warningKT-74278KSP tasks don't trigger a K/N distribution downloadingKT-75161Deprecate commonization parameters in KGP with an errorKT-71608Remove 'android()' targetKT-74669Executable binaries for JVM: a jar generated by jvmJar task isn't added to the build/install/testAppName/lib directoryKT-61817Remove support for Legacy Metadata Compilation with support of Compatibility Metadata VariantKT-69200Module 'intellij.kotlin.gradle.multiplatformTests' transitively depends on K1/K2 implementationKT-62643Increase DeprecationLevel to 'Error' on deprecated 'ExtrasProperty.kt' (Kotlin 2.2)KT-71454Remove not compatible with Project Isolation PomDependenciesRewriterKT-70493Improve gray-box testing experience in KGP-ITKT-73536Enable kmp isolated projects support for kotlin-test and patch PSM.jsonKT-58231Kotlin Gradle Plugin: set deprecation level to Error for KotlinTarget.useDisambiguationClassifierAsSourceSetNamePrefix and overrideDisambiguationClassifierOnIdeImport
Tools. Gradle. Native
KT-75171Provide custom freeCompilerArgs to Swift Export's link taskKT-74591HostManager.isMingw isLinux and isMac are not accessible in groovy scriptsKT-71069RemovekonanVersionfrom CInteropProcessKT-65692Remove Kotlin Native Performance pluginKT-74403:commonizeNativeDistribution fails when configured native targets cannot be built on machine
Tools. Gradle. Xcode
KT-66262Deprecate and remove support for bitcode embedding from the Kotlin Gradle plugin
Tools. Incremental Compile
KT-62555Wrong ABI fingerprint for inline function containing a lambdaKT-75155Split HistoryFileJvmIncrementalCompilerRunner and the current oneKT-74628Incremental compilation runner does not check compiler exit code before mapping sources to classesKT-75276Test IC issues with first-round failures that might be fixed by Fir runner
Tools. JPS
KT-76461Fix "compilation of typealias does not check for clashes" for JPSKT-73379Review the usage of JavaBuilder.IS_ENABLED inside the KotlinBuilder JSP builder
Tools. Kapt
KT-75202K2 kapt: mapped type class literal is converted incorrectlyKT-70797Remove obsolete K2 kapt implementation based on Analysis APIKT-64385K2: Enable K2 KAPT by default
Tools. Maven
KT-73012Migrate Kotlin Maven plugin to the Build Tools APIKT-43894Maven, Windows: error "RuntimeException: Could not find installation home path"KT-61285Remove multiplatform "support" from Maven Plugin
Tools. Performance benchmarks
KT-75563Fix crash on kotlin compiler server user project related to performance measurements
Tools. REPL
KT-75616[K2 Repl] Sealed hierarchies causes a FileAnalysisExceptionKT-75593[K2 Repl] Custom Delegates crash code genKT-75607[K2 Repl] ScriptingConfiguration.jvm.jvmTarget is not respectedKT-74607[K2 Repl] Lambda statement crashes code generationKT-74615[K2 REPL] Anonymous objects crash code generationKT-74856[K2 Repl] Snippet class files are missing Kotlin metadataKT-74768[K2 Repl] refineConfiguration does not update the classpath correctlyKT-74593[K2 Repl] defaultImports does not work in ScriptCompilationConfiguration
Tools. Scripts
KT-75589Scripts: "IndexOutOfBoundsException in jdk.internal.util.Preconditions.outOfBounds" when trying to extend a class which uses global variableKT-74004"Evaluate expression" fails in scripts