Releases: JetBrains/kotlin
Releases Β· JetBrains/kotlin
Kotlin 2.2.20-Beta2
Changelog
Analysis API. Code Compilation
KT-78382K2 IR lowering error when interface extends interfaceKT-73201K2 IDE: Error while evaluating expressions with local classesKT-78164Evaluator: '@JvmName' annotations are not recognized in other modules
Analysis API. FIR
KT-72227SOE from recursive value classKT-68977K2 IDE: Reference to companion object through typealias in a function call does not workKT-76490Do not load ast during the contracts phase if no contracts presentKT-72407FirImplementationByDelegationWithDifferentGenericSignatureChecker: FirLazyExpression should be calculated before accessing
Analysis API. Light Classes
KT-78065Support "Expose boxed inline value classes" in Light ClassesKT-78835Find usages of a light constructor from a class with an empty body finds usages of class as well
Analysis API. Providers and Caches
KT-78640Analysis API: Remove "friend builtins provider" fromFirDeclarationForCompiledElementSearcher
Analysis API. Standalone
KT-78638Analysis API Standalone: Stdlib builtins are not indexed inSTUBSdeserialized declaration origin mode
Analysis API. Surface
New Features
KT-73473Provide KaExpressionInformationProvider.isUsedAsResultOfLambda
Performance Improvements
KT-78526Get rid of redundantcheckValidityfromwithPsiValidityAssertion
Fixes
KT-78820K2: ISE "FIR element class FirErrorExpressionImpl is not supported in constant evaluation" through RedundantValueArgumentInspectionKT-75057Analysis API: Reference to object through typealias in invoke operator call leads to original typeKT-79042Do not restore KaTypePointer if target kind has changedKT-72421AA: "KtReference.resolveToSymbols" returns empty list when ASSIGN_OPERATOR_AMBGUITY error is presentKT-63464AA: KtPsiTypeProvider#asPsiType doesn't substitute kotlin.UnitKT-75913K2: SymbolLightLazyAnnotation evaluates arguments and replaces them with constantsKT-73184Analysis API: KaFunctionCallο»Ώ.argumentMapping is unexpectedly deparenthesisedKT-78613PSI: add binary compatibility checksKT-74013Analysis API: Cover the API surface with@SubclassOptInRequiredannotationsKT-76614Move the parser and lexer to a separate moduleKT-78552KaFunctionValueParameteris not marked asKaLifetimeOwnerKT-71152Add back SubclassOptInRequired to classes in KaModule.ktKT-77674Analysis API: Redundant smart cast to the original type
Backend. Wasm
New Features
KT-65721K/Wasm: stop unconditionally exporting any main function from the root package
Fixes
KT-73931WASM: "RuntimeError: illegal cast" with nullable genericKT-65403[WASM] RuntimeError is thrown instead of ClassCastExceptionKT-79317[Wasm] Do not throw CCE for ExcludedFromCodegen declarationsKT-66085K/WASM: Runtime error is uncaught withcatch (e: Throwable)KT-66072K/Wasm: improve how exceptions work in JS interopKT-78384K/Wasm: Incorrect debug info of local declarations in inline function from another fileKT-71533K/Wasm + K2: no error on KClass::qualifiedName usagesKT-72220Wasm: Unclear exception in case of missed dependencyKT-71691No trace on Wasm/JS if an error occurred in initializing global variables in a file with the main functionKT-69570K/Wasm: JsExport with default parameter value compiles to invalid Wasm
Compiler
New Features
KT-78792Report warning for redundant return in expression bodyKT-45683Allow generics in contract type assertionsKT-71244Incorporate existing@CheckReturnValueannotation(s) into Kotlin's unused return value checkerKT-32313Support contracts for operator functionsKT-76766Warning is missing for wrong subclass checkingKT-65688Generate when-expressions over final classes via invokedynamic typeSwitch + tableswitch on JDK 21+
Performance Improvements
KT-78672Consider having FirCallableSymbol.callableId null for local properties / parametersKT-77839K2: consider not creating CallableId for value parameters / variables / fields
Fixes
KT-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-79442"Multiple annotations of type kotlin.coroutines.jvm.internal.DebugMetadata": 2.2.0-Beta1 generates broken code with JVM default suspend methods in interfacesKT-79354IllegalStateException: Debug metadata version mismatch. Expected: 1, got 2 with compiler 2.2.20-Beta1 and stdlib 2.2.0KT-78479IR lowering failed / Unexpected null argument for composable callKT-77401[FIR]ParameterNameTypeAttribute.namedoesn't support@ParameterNamewith compile-time constant property argumentKT-77986K2: False negative: "Local classes are not yet supported in inline functions"KT-78843FIR tree: comments within String concatenation aren't visited in 2.2.0KT-76477Kotlin/Native: fix compiler performance reporting in sources->klib and klibs->binaryKT-78589"Class does not have member field" caused by delegation from a Java to Kotlin classKT-79076'IllegalStateException: Cannot serialize error type: ERROR CLASS: Uninferred type' with Exposed column using recursive generic typeKT-78726Split runPsiToIr phase into runPsiToIr and runIrLinkerKT-77672K/N: come up with a fallback strategy for the casts optimization passKT-76585K2: RETURN_IN_FUNCTION_WITH_EXPRESSION_BODY is not reported inside initializers of local variablesKT-79099K2: Do not inherit inline modifierKT-76902Omit type-use annotations from diagnosticsKT-79085Adding-Xreturn-value-checker=fullto kotlinc causes "error: conflicting overloads"KT-58988K2: Deprecate exposing package-private parameter of internal methodKT-77199OPT_IN_USAGE_ERROR is still absent when calling the enum primary constructorKT-72800K2: java.util.NoSuchElementException when introduce variableKT-79056Add experimental language version 2.5- [
KT-78351...
Kotlin 2.2.10-RC
Changelog
Compiler
KT-78501K2: Missing [ABSTRACT_SUPER_CALL] diagnostics for delegated interface method leads to AssertionError: isCompiledToJvmDefault during IR loweringKT-78479IR lowering failed / Unexpected null argument for composable callKT-76477Kotlin/Native: fix compiler performance reporting in sources->klib and klibs->binaryKT-78736Missing [NOT_YET_SUPPORTED_IN_INLINE] diagnostics because of incorrect context updateKT-77685"IllegalArgumentException: Sequence contains more than one matching element"KT-76365K2: Missing ABSTRACT_SUPER_CALLKT-78352False-positive IDENTITY_SENSITIVE_OPERATIONS_WITH_VALUE_TYPE when comparing with equality operator (==)
Compose compiler
KT-78479Ensure that default transform affects functions entered through a callKT-78490Fix visibility for default wrappers of protected methodsb/408492167Emit parameter names in Compose source information
Native. Runtime. Memory
KT-78925Crash SIGABRT on Apple Watch after updating Kotlin to 2.2.0
Tools. CLI
KT-77445UNRESOLVED_REFERENCE when importing classes from kotlin-stdlibKT-78263java.lang.NoClassDefFoundError: Could not initialize class com.intellij.psi.impl.PsiSubstitutorImplKT-78318Unresolved reference when compiling kotlin/JS project on fresh master
Tools. Compiler Plugins
KT-78490"AssertionError: SyntheticAccessorLowering should not attempt to modify other files" when calling protected open composable with default argumentKT-78038Make jvm-abi-gen compiler plugin output classloader-friendly
Tools. Gradle
KT-77023Support creating KotlinJvmAndroidCompilation in KotlinBaseApiPlugin
Tools. Gradle. JS
KT-78504[2.2.0-RC3] NPM Tasks in 2.2 RCs produce broken/unusable build cache entries
Tools. Gradle. Multiplatform
KT-77466KMP - testFixturesApi and similar configurations do not affect jvmTestFixtures source setKT-68646Compose extension's metrics/reports dir should use subdirs based on target
Tools. Gradle. Native
KT-77977"Unknown hardware platform: riscv64" on JVM project build
Tools. Incremental Compile
KT-78807Changing ABI fingerprint on non-ABI changes when lambda passed to inlined function
Tools. Kapt
KT-77853K2 KAPT: backend internal error: exception during IR fake override builder
Kotlin 2.2.20-Beta1
Changelog
Analysis API
KT-78187Synthetic properties not to be shown as callablesKT-72525K2. red code and KIWA on new-lines in guarded when conditions (with parentheses)KT-61728Analysis API: optimize AllCandidatesResolver.getAllCandidates
Analysis API. Code Compilation
KT-76457K2 IDE / KMP Debugger: KISEWA βCannot compile a common source without a JVM counterpartβ on evaluating inline fun from common module inside jvmKT-73084K2 evaluator cannot resolve local variables standing at the closing brace
Analysis API. FIR
Performance Improvements
KT-78132Do not check FirElementBuilder#tryGetFirWithoutBodyResolve optimization for already resolved declarations
Fixes
KT-72357Implement partial body resolutionKT-77629K2: NPE: "org.jetbrains.kotlin.fir.java.declarations.FirJavaTypeParameter.performFirstRoundOfBoundsResolution"KT-76855Analysis API:KaType.asPsiTypereturnsnullfor a local inner class in dependent analysis testsKT-72718ImplicitReceiverValue.createSnapshot creates invalid FIR if receiver is smart-castedKT-76811Analysis API:resolveToFirSymbolfinds aFirPropertySymbolfor aKtScriptin dependent analysisKT-73586[Analysis API] AddlazyResolveToPhase(STATUS)before accessing modifiers of membersKT-71135AA: exception from sealed inheritors checker whenanalyzeCopyKT-75534K2 AA: "Containing declaration should present for nested declaration class KtNamedFunction" with dangling annotation on top-level anonymous functionKT-75687K2: local variable doesn't get to the do-while scopeKT-56543LL FIR: rework lazy transformers so transformers modify only declarations they suppose to
Analysis API. Infrastructure
KT-76809Analysis API: Dependent analysis tests frequently work with the original element instead of the copied element
Analysis API. Light Classes
KT-78076DLC: KotlinDeclarationInCompiledFileSearcher missed accessors if types are boxedKT-77569SLC: annotation missing from generated no-args constructorKT-75182K2 AA. False positive red code "Unresolved reference" to a Kotlin method in Java when Kotlin uses a value class with@JvmOverloadsKT-77564Constructor with JvmOverloads and value class shouldn't mark regular constructors privateKT-77505K2: find usages on java accessor methods do not detect kotlin property accessor usagesKT-76789Annotation resolve shouldn't search through non-class membersKT-76907Wrong equality between repeatable annotation and container
Analysis API. Providers and Caches
KT-74907Analysis API: Apply platform-based library module content restrictions consistentlyKT-77578Analysis API: Performance degradation ofKaBaseResolutionScope.containsafter introduction of library restriction scopesKT-77605AA: Leaking KaDanglingFileModule through IdeKotlinPackageProviderKT-62474Analysis API: Improve mergeability and performance of custom search scopesKT-77022Get rid of ExpectBuiltinPostProcessor workaroundKT-77248Delegation ofJavaModuleResolveris restricted toCliJavaModuleResolverKT-76850LLFirLibrarySession cannot be cast to LLFirResolvableModuleSessionKT-76952Analysis API:whenexhaustiveness analysis fails for sealed classes in dangling filesKT-72390Kotlin project full of red code
Analysis API. Stubs and Decompilation
KT-77496Support HAS_MUST_USE_RETURN_VALUE metadata flags in FirStubBasedMemberDeserializerKT-77778Function receivers doesn't have annotationsKT-77777Receiver annotations shouldn't be present on typesKT-77538Support default property accessors with annotationsKT-77763Decompiled stubs miss inline modifier for property accessorsKT-77309Decompiled property from annotation constructor with default value should have a constant initializerKT-77168Prefer DataInputOutputUtil for serialization/deserializationKT-77117Flaky WRONG_ANNOTATION_TARGET diagnosticKT-76791Function signature types are deserialized inconsistentlyKT-76947Support functional types with context parameters
Analysis API. Surface
New Features
KT-77278Implement psi-basedKaFirKotlinPropertyKtPropertyBasedSymbol#hasBackingFieldKT-70770KaLocalVariableSymbol: supportisLateInit
Fixes
KT-75913K2: SymbolLightLazyAnnotation evaluates arguments and replaces them with constantsKT-78278ISE: FIR element "class org.jetbrains.kotlin.fir.expressions.impl.FirErrorResolvedQualifierImpl" is not supported in constant evaluation at org.jetbrains.uast.kotlin.internal.FirKotlinUastConstantEvaluator.evaluateKT-73327Cover all psi inputs with scope validity assertionsKT-71876Support storing parameter names inKaFunctionTypeKT-77738AA: inconsistentKaType.allSupertypesregarding multiple iterationsKT-73723K2 AA, KaFirVisibilityChecker: protected member of superclass is not visible from anonymous objectKT-78057[Analysis API, K2] Context parameters are not resolved in KDocKT-73758K2 Mode: "KaEvaluator.evaluate" does not work for simple arithmetic expressionsKT-72301K2 AA.PSI should present for declaration built by Kotlin codeon property access syntax of generic Java getter through Kotlin subclassKT-77730K2: Unable to get a light PSI for a nested annotation used with fully-qualified nameKT-73216K2: unresolvable references in type parametersKT-71794Analysis API: Types with errors have unresolved qualifiers in lambda parameters positionKT-65846Support parameter names in functional type renderingKT-76738K2 AA: rendering constructor of sealed class inserts protected modifierKT-77515KaTypeProvider#receiverTypeshould be more tolerant to an error codeKT-77333K2 AA: KaFirTypeProvider.getType: InvalidFirElementTypeException: For TYPE_REFERENCE with textI, unexpected element of type: FirSuperReceiverExpressionImpl foundKT-76044K2 AA: isFun is true for restored symbol of Java interface with several methodsKT-77264KaTypeProvider#typeshould be more tolerant to an error codeKT-77282KaPropertySymbol: supportisDelegatedPropertyfor librariesKT-77254K2 AA: expectedType doesn't provide anything for parameter default valueKT-74777KaVariableSymbol.hasBackingField returns incorrect result for librariesKT-77280RenameKaPropertyAccessorSymbol#isCustomtoisNotDefaultKT-77210Analysis API: `scopeContex...
Kotlin 2.2.0
Changelog
Analysis API
KT-73337Migrate analysis sources to new IR parameter APIKT-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 providersKT-69535Redesign 'containingSymbol'KT-69950Analysis API: IntroduceisSubtypeOf(ClassId)KT-68393Analysis API: RenameKaClassLikeSymbol. classIdIfNonLocaltoclassIdKT-62924Analysis API: rename KtCallableSymbol.callableIdIfNonLocal -> callableId
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
New Features
KT-73493Support context parameters
Performance Improvements
KT-75790Experiment with increasing DEFAULT_LOCKING_INTERVAL timeKT-72159LLFirCompilerRequiredAnnotationsTargetResolver: consider rewriting it to use honest jumping locks
Fixes
KT-76331Cleanup FileStructureElement for classesKT-73117K2 AA: Exception "Setter is not found" when val has a setter without bodyKT-76540K2: Missing library dependency on Android SDK from androidx.activity-1.8.2 causes LiveEdit failuresKT-73266K2. "Declaration should have non-local container" with unclosed annotation on top-level functionKT-76432JavaClassUseSiteMemberScope: Expected FirResolvedTypeRef with ConeKotlinType but was FirUserTypeRefImplKT-76217K2 AA: "No fir element was found for KtParameter" with multiple context parameter listsKT-74740Highlighting is broken after the built-in serialization refactoringKT-76366ContextCollector: annotations on class members don't have the class as implicit receiverKT-76352ContextCollector: wrong class annotation context in BODY modeKT-76341ContextCollector: support dangling modifiersKT-76332"Declaration should have non-local container" for declaration inside file annotationKT-76115DisableFirElementBuilder#getFirForElementInsideAnnotationsoptimization for files, classes and scriptsKT-76347ContextCollector: avoid resolution for enum entry annotationsKT-76272Cleanup AbstractFileStructureTestKT-75542K2 AA: "FirDeclaration was not found for class KtNamedFunction, fir is class FirErrorExpressionImpl" for unclosed annotation on member functionKT-73719K2. "FirDeclaration was not found for class KtDestructuringDeclaration, fir is class FirBlockImpl" on incorrect chain callKT-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-74818K2 AA: "FirDeclaration was not found for class KtTypeParameter, fir is null" with TYPE_PARAMETERS_NOT_ALLOWED on anonymous functionKT-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-73405Get rid of KtElement#{symbolPointer, symbolPointerOfType} API usagesKT-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-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
Performance Improvements
KT-62115Analysis API: Package providers are not cached per search scopeKT-74463Analysis API:LLNativeForwardDeclarationsSymbolProviderqueries its cache even when theClassIdcannot represent a native forward declaration
Fixes
KT-74541Analysis API: Include files generated by resolve extensions inKaModulecontent scopesKT-64236Analysis API: Introduce a separate module for fallback dependencies of library source modulesKT-74090Analysis API: Support dumb mode (restricted analysis)KT-63780Analysis API: Invalidate resolvable library sessions when binary library modules are modifiedKT-72388KaFirStopWorldCacheCleaner: Control-flow exceptionsKT-74943Analysis API: ReplaceKotlinGlobalModificationServicewith simpler global modification event publishing and listener-based modification trackersKT-70518K2: Analysis API: Access indices outside ofConcurrentMapcomputation in...
Kotlin 2.2.0-RC3
Changelog
Compiler
KT-77301False positive Context Parameter resolution when using DslMarker
JavaScript
KT-78073K/JS: KProperty from local delegate changes after another delegate is invoked
Klibs
KT-78168K/N: "IndexOutOfBoundsException: Index 3 out of bounds for length 3" for iOS build with Kotlin 2.2.0-RC2
Kotlin 2.2.0-RC2
Changelog
Backend. Wasm
KT-77622K/Wasm: investigate CMP crash on mobile Safari
Compiler
KT-77220Annotation with EXPRESSION is not allowed on lambdas in Kotlin 2.2.0
Compose compiler
b/420729503Avoid copying@Deprecatedannotations on Compose compiler stubsb/417412949Emit fake line number forskipToGroupEndbranch
IR. Tree
KT-77508K/JS and K/Native CompilationException Wrong number of parameters in wrapper
JVM. Reflection
KT-77663Reflection: java.util.ServiceConfigurationError: "module kotlin.reflect does not declareuses" when using kotlin-reflect in modular mode
Tools. CLI
KT-77445UNRESOLVED_REFERENCE when importing classes from kotlin-stdlib
Tools. Gradle. Multiplatform
KT-77404The kotlin-stdlib and annotations are missing from commonTest dependencies with 2.2.0-Beta1
Kotlin 2.2.0-RC
Changelog
Compiler
Fixes
KT-77259Confusing message forANNOTATION_WILL_BE_APPLIED_ALSO_TO_PROPERTY_OR_FIELDKT-77219"@Composableannotation is not applicable" on vararg@Composable() -> Unit in Kotlin 2.2.0KT-77397Report UNSUPPORTED_CONTEXTUAL_DECLARATION_CALL when calling declaration with contextual function type in signatureKT-74470NSME on calling in runtime internal constructor of value class with default arg from testsKT-77137K2: Controversial behavior allows resolving annotation arguments on a companion inside itKT-77150Native: compilation fails with an assertion errorKT-76357K2: a nested class annotation observes member declarations of the outer classKT-77283Binary compatibility of FirDeclarationCheckerKT-75457Native: cache machinery uses stdlib cache with default runtime options even if custom runtime options are supplied when partial linkage is disabledKT-76898K2: ClassCastException when data class shadows supertype'scomponentXmethod with wrong typeKT-77078K2: anonymous object is wrongly allowed to implement interfaces by unsafe DelegationKT-77001Leave ForbidParenthesizedLhsInAssignments as a warning
Compose compiler
CMP-7873Native build fails with "e: Compilation failed: Exception during generating code for following declaration"b/412584977Fix false positive for overriding open functions from older dependencies
JavaScript
KT-77418KJS: cannot debug with whole-program granularityKT-77271KJS / Serialization: "Cannot set property message of Error which has only a getter"KT-69591KJS / d.ts: Wrong type of SerializerFactory for abstract classesKT-42305KJS / IR: "Class constructor is marked as private"@JsExportproduces wrong TS code for sealed classesKT-52563KJS / IR: Invalid TypeScript generated for class extending base class with private constructor
Native
KT-76992Native: update llvm for windows targets
Native. Build Infrastructure
KT-77349Kotlin/Native: default cache for stdlib is unused
Tools. Gradle
KT-76138Compile against Gradle API 8.14KT-76139Run integration tests against Gradle 8.14KT-76137Compatibility with Gradle 8.14 releaseKT-76797KGP: StdlibDependencyManagementKt.configureStdlibVersionAlignment() triggering eager configuration realizationKT-77288Using 'KotlinJvmOptions' is an error - Gradle sync issue when using 2.2.0-Beta2 with Android Gradle PluginKT-77035A compiler diagnostic isn't reported when its severity is set to warning with GradleKT-73142Kotlin Gradle plugin: Remove usage of Gradle's internal ExecHandleBuilderKT-75823Resources bundle with XCFrameworks for iOS
Tools. Gradle. JS
KT-77119KJS: Gradle: Setting custom environment variables in KotlinJsTest tasks no longer works
Tools. Gradle. Native
KT-77067Kotlin Gradle plugin with the configuration cache passes all platform libraries to the compiler when compiling a binary for the first time
Tools. Wasm
KT-76948Wasm: Rename kotlinBinaryenSetup and kotlinD8Setup
Kotlin 2.1.21
Changelog
Backend. Native. Debug
KT-75991Xcode 16.3: Fix lldb stepping test over an inline function
Compiler
KT-75992Xcode 16.3: stacktraces on simulators are not symbolicatedKT-76663KJS: KotlinNothingValueException caused by expression return since 2.1.20KT-75756Backend Internal error: Exception during IR lowering when trying to access variable from providedProperties in class within kotlin custom scriptKT-76209CONFLICTING_UPPER_BOUNDS onNothingboundKT-70352K2: False-negative CONFLICTING_UPPER_BOUNDS onNothingboundKT-74739Native: "IllegalArgumentException: All constructors should've been lowered: FUNCTION_REFERENCE"KT-75483Native: redundant unboxing generated with smart castKT-71425IR Inliner: investigate return type of an inlined block
Native
KT-76252Native: executable crash with generic value classes with 2.1.20
Native. C and ObjC Import
KT-75781Xcode 16.3: Fix cinterop tests failing with fatal error: could not build module '_stdint'
Native. Runtime. Memory
KT-74280Native: GC.collect crashes with -Xallocator=std
Tools. CLI
KT-75588[2.1.20-RC] "was compiled by a pre-release version of Kotlin and cannot be loaded by this version of the compiler" warnings despite using the same compiler versionKT-74663kotlinc-js CLI: not providing -ir-output-dir results in NullPointerException
Tools. Compiler Plugins
KT-76162"IllegalStateException: No mapping for symbol: VALUE_PARAMETER INSTANCE_RECEIVER" after updating to 2.1.20
Tools. Gradle
KT-73682Compatibility with Gradle 8.12 releaseKT-73142Kotlin Gradle plugin: Remove usage of Gradle's internal ExecHandleBuilderKT-36004Update 'org.gradle.usage' attribute rules to support the 'JAVA_API' and 'JAVA_RUNTIME' valueKT-73968KotlinDependencyManagement tries to mutate configuration after it was resolvedKT-73684Run integration tests against Gradle 8.12KT-72694Accessing Task.project during execution is being deprecated in Gradle 8.12KT-73683Compile against Gradle API 8.12
Tools. Gradle. JS
KT-77119KJS: Gradle: Setting custom environment variables in KotlinJsTest tasks no longer worksKT-74735KGP uses Gradle internalCompositeProjectComponentArtifactMetadataKT-71879Notice of upcoming deprecation for Boolean 'is-' properties in Gradle Groovy scripts
Tools. Gradle. Multiplatform
KT-75808KGP: MPP with jvm target and Gradle java-test-fixtures is brokenKT-75605Dependency resolution fails in commonTest/nativeTest source sets for KMP module when depending on another project due to missing PSMKT-75512Maven-publish: ArtifactId is not correct inpomfile with customizedwithXml
Tools. Incremental Compile
KT-62555Wrong ABI fingerprint for inline function containing a lambdaKT-75883Follow-up: switch from INSTANCE heuristic to outerClass chain
Tools. Kapt
KT-75936K2 KAPT: unsupported FIR element kinds in constant evaluationKT-75942K2 KAPT: underscore not allowed here
Tools. Scripts
KT-76424Dependencies in main.kts not working with 2.1.20KT-76296Kotlin script compiler crashes when secondary constructor calls a functionKT-75589Scripts: "IndexOutOfBoundsException in jdk.internal.util.Preconditions.outOfBounds" when trying to extend a class which uses global variable
Tools. Wasm
KT-76161Wasm: "export startUnitTests was not found" after updating to Kotlin 2.1.20
Kotlin 2.1.21-RC2
Changelog
Tools. Gradle. JS
KT-77119KJS: Gradle: Setting custom environment variables in KotlinJsTest tasks no longer works
Kotlin 2.2.0-Beta2
Changelog
Analysis API
KT-73337Migrate analysis sources to new IR parameter APIKT-68393Analysis API: RenameKaClassLikeSymbol. classIdIfNonLocaltoclassIdKT-62924Analysis API: rename KtCallableSymbol.callableIdIfNonLocal -> callableIdKT-63718Analysis API: Stub-based dependency symbol providers of library source sessions compute the wrong package name sets
Analysis API. FIR
Fixes
KT-76540K2: Missing library dependency on Android SDK from androidx.activity-1.8.2 causes LiveEdit failuresKT-73266K2. "Declaration should have non-local container" with unclosed annotation on top-level functionKT-76432JavaClassUseSiteMemberScope: Expected FirResolvedTypeRef with ConeKotlinType but was FirUserTypeRefImplKT-76217K2 AA: "No fir element was found for KtParameter" with multiple context parameter listsKT-76366ContextCollector: annotations on class members don't have the class as implicit receiverKT-76352ContextCollector: wrong class annotation context in BODY modeKT-76341ContextCollector: support dangling modifiersKT-76332"Declaration should have non-local container" for declaration inside file annotationKT-76331Cleanup FileStructureElement for classesKT-76115DisableFirElementBuilder#getFirForElementInsideAnnotationsoptimization for files, classes and scriptsKT-76347ContextCollector: avoid resolution for enum entry annotationsKT-76272Cleanup AbstractFileStructureTestKT-75542K2 AA: "FirDeclaration was not found for class KtNamedFunction, fir is class FirErrorExpressionImpl" for unclosed annotation on member functionKT-73117K2 AA: Exception "Setter is not found" when val has a setter without bodyKT-73719K2. "FirDeclaration was not found for class KtDestructuringDeclaration, fir is class FirBlockImpl" on incorrect chain call
Analysis API. Providers and Caches
KT-74541Analysis API: Include files generated by resolve extensions inKaModulecontent scopesKT-64236Analysis API: Introduce a separate module for fallback dependencies of library source modulesKT-63780Analysis API: Invalidate resolvable library sessions when binary library modules are modified
Analysis API. Stubs and Decompilation
KT-71787PsiRawFirBuilder.Visitor#visitStringTemplateExpressionforces AST loading
Analysis API. Surface
KT-76018K2: Stop the wold leads to deadlock/freezeKT-73669Support psi-based symbol pointer for implicit primary constructorsKT-76011KaFirNamedClassSymbol#companionObjectdoesn't provide generated objects generated by compiled pluginsKT-76008Provide PSI-based implementation forKaFirNamedClassSymbol#companionObject
Backend. Native. Debug
KT-75991Xcode 16.3: Fix lldb stepping test over an inline function
Backend. Wasm
KT-76747[Wasm] Wasm name section absent for wasm structsKT-76701K/Wasm: custom formatters are not loaded when a project is built with incremental compilationKT-66081K/WASM:0/0,5/0and5%0throw not ArithmeticException, but RuntimeErrorKT-76287[Wasm] Enable stdlib and kotlin.test tests after compiler bootstrapKT-75871[Wasm] Implement new RTTI approachKT-75872Wasm / IC: IllegalStateException: IC internal error: can not find libraryKT-73362Migrate K/Wasm sources to new IR parameter API
Compiler
New Features
KT-70722Implement better Kotlin warnings for value classes and JEP 390 (Warnings for Value-Based Classes)KT-57919Store all annotations in Kotlin metadata on JVM under a flagKT-54205Support jakarta Nullability annotations
Performance Improvements
KT-76422FirJavaFacade#createFirJavaClass: do not compute super type references right away
Fixes
KT-75828Store backing field/delegate annotations and extension receiver annotations in metadataKT-76663KJS: KotlinNothingValueException caused by expression return since 2.1.20KT-76615K2: "IllegalArgumentException: Inline class types should have the same representation: Lkotlin/UByte; != B" for mixed Java/Kotlin codeKT-76805Wrong NPE occurs when assigning synthetic properties with platform types in Kotlin 2.1.20KT-76253K2 Compiler: Less precise diagnostic COMPONENT_FUNCTION_AMBIGUITY for flexible typeKT-76583CCE: suspend lambda attempts to unbox value class parameter twice after lambda suspendedKT-59526Store annotation default values in metadata on JVMKT-63850K2: setter with an annotated parameter hasisNotDefault == falseflag in metadataKT-75712-Wextra: false positive UNUSED_LAMBDA_EXPRESSION on functional type variable assignment with inferred typeKT-69624Debugger: Missing local variable in Variables view (inline function)KT-75992Xcode 16.3: stacktraces on simulators are not symbolicatedKT-76199Introduce -Xcontext-sensitive-resolution compiler flagKT-75553MISSING_DEPENDENCY_SUPERCLASSandMISSING_DEPENDENCY_SUPERCLASS_WARNINGis reported at the same time on the same elementKT-76159Obsolete error "'@JvmDefaultWithCompatibility' annotation is only allowed on interfaces" should be removedKT-76660False negative RETURN_NOT_ALLOWED in lambda in default argument leads to NoClassDefFoundError:$$$$$NON_LOCAL_RETURN$$$$$KT-76301Fail to infer types after syntactical changeKT-74999K2: KotlinNothingValueException within Extension FunctionKT-76675KIAEWA exception at KaFirDataFlowProvider with non-local return from nested inline callKT-75756Backend Internal error: Exception during IR lowering when trying to access variable from providedProperties in class within kotlin custom scriptKT-76171"KotlinIllegalArgumentExceptionWithAttachments: Expected expression 'FirSingleExpressionBlock' to be resolved"KT-76345Enhance variable fixationKT-76578[FIR, K1/K2 Regression]lateinitis allowed on loop parametersKT-76448FirOverrideChecker: class ClsMethodImpl is not a subtype of class KtNamedDeclaration for factory VIRTUAL_MEMBER_HIDDENKT-73360Migrate K/JVM sources to new IR parameter APIKT-76606Enable 'Indy: Allow lambdas with annotations' by defaultKT-74852Kotlin/Native: allow caches for thread state checker and sanitizersKT-76130IR evaluator does not support array literals in annotation parameter default valuesKT-76436Missing K2 checker: non-local return through lambda passed to inline f/oKT-74326False negative: no variable must be initialized ...