Changelog
Analysis API. FIR
KT-83467Package-level JSpecify annotations are ignored when coming from jars or librariesKT-82846AA: unresolved KtExpression.expressionType for the reference to the parameter with default value
Analysis API. Infrastructure
KT-83173Analysis API Tests: Library names with RC versions aren't sanitised
Analysis API. Surface
Performance Improvements
KT-83694Provide psi-based implementation ofKaDeclarationSymbol#isExternalKT-70868KaSymbol: support PSI-only visibility and modality for the case without compiler plugins
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.DefaultTypeClassIds
Backend. Wasm
KT-67461Use new lowering phase creation API in Wasm backendKT-83664Wasm: Colon and space are not sanitized in output file namesKT-82309K/Wasm: refactor _initialize functionKT-65779JsExport declaration name clashKT-83025Wasm: Compose application is not loading
Compiler
New Features
KT-55548JSR-305: Overload resolution ambiguity: Platform Types vs Kotlin TypesKT-74860Support Unit coercion (incl. fun refs) in unused return value checkerKT-83401Collection literals: support different types of expected types for CLKT-80492Checkers for operatorofKT-82638Collection literals: resolve to factory functions for standard library classesKT-82655Bridges generated for non-fake overrides shall include annotations from target methodsKT-75736Enable reading/writing annotations in metadata on JVM by default
Performance Improvements
KT-83036Native: too many casts emitted with -Xgeneric-safe-casts=trueKT-73687Inefficient KtCommonFile#getFileAnnotationList
Fixes
KT-83031K2: unstable resolution of EnhancedNullability from type-use NotNull in presence of unused codeKT-78443Refactor session component initialization for multi-target compilationKT-82579Update specificity rule for context parametersKT-83427Arguments of plugin-generated annotations are serialized incorrectlyKT-83395Kotlin/Native 2.3.0 iOS release framework fails with Invalid LLVM module (PHI node type mismatch)KT-83538OPERATOR_RENAMED_ON_IMPORT is not reported for 'provideDelegate' operatorKT-83537OPERATOR_RENAMED_ON_IMPORT is not reported for 'of' operatorKT-81567Add a use-site warning if a@DslMarker-marked annotation is used on entities where it is a no-opKT-83657[K/N] Pre-codegen inline produces invalid bitcodeKT-82721Inconsistent explicit backing fields behaviorKT-83317ClassCastException: with cast kotlin.UInt to java.lang.Number when defining constantKT-83314JSpecify@NullMarkedchanges Java equals(Object) to equals(Any?) causing override conflict in Kotlin 2.3KT-83589Explicit backing fields don't likely work with intersection overridesKT-83588Explicit backing field is falsely accessible from a subclass via a substitution overrideKT-78783K2: absence of warning for KTLC-284 migrationKT-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-83282JvmExposeBoxed: Duplicate annotation interface kotlin.coroutines.jvm.internal.DebugMetadata in class %class%$1 for suspend inline class valueKT-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-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-83185Kotlin repeatable annotations are incorrectly deserialized from bytecodeKT-82863@NoInferregression since 2.2.20KT-82311Header mode: Error expression when assigning function declaration to a propertyKT-81763Incorrect comparison result when using elvis ?: with nullable Long valuesKT-83153Properly ignore contract statements in the Return Value CheckerKT-78589"Class does not have member field" caused by delegation from a Java to Kotlin classKT-80525Update IntelliJ SDK dependency to 251.27812.49KT-74572Context parameters: contracts don't work with context parameters
Compose compiler
b/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. Inlining
KT-80814[IR Inliner] Space: jsBrowserProductionWebpack task failed with HookWebpackErrorKT-83280SplitLibrarySpecialCompatibilityChecksTestinto pure JS and pure Wasm testsKT-79899[IR Inliner] Split single-module tests havinginline funinto filesKT-83148KLIB inliner: Make both "inliner" language features to require Api Version = 2.3
IR. Interpreter
KT-82161Enable Enum.name and KCallable.name to constant evaluation
IR. Tree
KT-82765Kotlin/Native: Internal compiler error when building DFGKT-83236PeopleInSpace_mpp compilation error: The symbol table has been sealedKT-81154[IrValidator] Fine-tune IrVisibilityChecker on 2nd stage
JVM. Reflection
KT-83361"KotlinReflectionInternalError: Type parameter not found: 0" on super types with Kotlin 2.3.0KT-83608Kotlin-reflect: "Unknown origin of public abstract operator fun invoke(p1: P1, p2: P2): R"KT-42199"KotlinReflectionInternalError: Unknown origin of public abstract operator fun invoke" on function reference to FunctionN.invokeKT-83067Reflection: IAE "argument type mismatch" on callBy with vararg of generic type parameter with primitive upper bound
JavaScript
New Features
KT-83455K/JS: Support ES6 default function arguments in js() callsKT-83454K/JS: Support ES6 classes 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-82128[K/JS] Allow named companion objects in exported interfaces
Fixes
KT-65802How to implement Interfaces in Javascript/Typescript?KT-83830Relocate org.antlr.v4 to an internal packageKT-70986Add Swc into the compilation pipeline of Kotlin/JSKT-60554KJS: rethink JS_*_NAME_CLASH diagnosticsKT-83528K/JS: Array holes in array literals are ignored in the new js() parserKT-82552KJS: "Non-abstract class does not implement inherited abstract member from class" errors in generated .d.tsKT-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 accessible
Klibs
KT-82736False positiveIR_PRIVATE_CALLABLE_REFERENCED_BY_NON_PRIVATE_INLINE_FUNCTION_ERRORon referenece to local declarationKT-82586Export in previous version (JS, Wasm): adjust the checker for incompatible Kotlin stdlib/compiler pairsKT-82758[PL] Change the behavior of getting name of removed propertyKT-81470Simplify inline function deserialization after the bootstrap updateKT-83328kotlin-wasm-benchmarks: Compilation errors due to missing KLIB dependenciesKT-81957[JS] Create a common Gradle test taskKT-78365[PL] Change the behavior of getting name of removed function
Language Design
KT-83009Exposing of non-exportable API from interfaces
Libraries
KT-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-80786Annotate kotlin-stdlib-jdk7/8 with@IgnorableReturnValueKT-83181Remove@IgnorableReturnValuefrom contract DSL functionsKT-83290Remove unnecessary ExperimentalTime annotation from Uuid functions
Native. ObjC Export
KT-82160K/N: bridge for fake override is not built but requested
Native. Runtime. Memory
KT-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 message
Native. Swift Export
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-83141Swift Export: suspendable covariant functional type
Tools. BCV
KT-83484Create fat-jar artifact for abi-tools [ABI Validation]
Tools. Build Tools API
KT-82702BTA: Allow collecting compiler lookups in non-incremental modeKT-78198BTA: implement basic metrics collectionKT-81790[BTA] Make build operations and configuration immutable after executeKT-81729BTA: loading from a classloader without implementation fails with CNFE instead of error with explanationKT-82399[BTA] JvmClasspathSnapshottingOperationImpl doesn't use Option defaults
Tools. CLI
KT-83202Report all errors during parsing CLI arguments instead of a single oneKT-83044Report redundant CLI arguments when they have no effect
Tools. Compiler Plugin API
KT-83823DeprecatePreprocessedVirtualFileFactoryExtension
Tools. Compiler Plugins
New Features
KT-28594Add a 'jpa' pre-defined flavor to the allOpen compiler plugin.
Fixes
KT-83334Lombok. Builder function is unavailable for a generic classKT-83217Lombok. With method is available for the static fieldKT-83120Lombok. A constructor is available for a class with an existing constructor and@Data/@ValueannotationKT-83119Lombok. canEqual is not available from kotlin for a class with@DataannotationKT-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-83063Lombok: Setter/getter is not available with a protected access level
Tools. Gradle
New Features
KT-79389Add allopen plugin + JPA preset to kotlin.plugin.jpa
Fixes
KT-82885Run tests against Gradle 9.3.0KT-83323Run integration tests against Gradle 9.2KT-82884Compile against Gradle API 9.3.0KT-78763Compatibility with Gradle 9.1.0 releaseKT-78754KGP: Remove usages of isVisible/setVisibleKT-80356Compatibility with Gradle 9.2.0 releaseKT-78104Deprecate CleanableStore infrastructureKT-83316[BTA] Build Reports missing information when JVM compilation uses Build Tools APIKT-83125Deprecate out-of-process compilation modeKT-83161CRI: it is not clear that CRI generation requires BTA being enabledKT-81830Create autogenerated kotlin version constants to be used with disableNativeCache DSLKT-83322Compile against Gradle 9.2 APIKT-80186Remove usage of deprecated Gradle API Project.container(...)
Tools. Gradle. BCV
KT-80614Add dependency on abi check from gradle's check task [ABI Validation]
Tools. Gradle. JS
KT-82946Js, Wasm: Upgrade NPM dependencies
Tools. Gradle. Multiplatform
KT-83687Revert deprecation of 'androidTarget' for AGP lower than 9KT-77258Query status of cross-compilation or compilation taskKT-81973NPE with Cannot invoke "java.util.List.get(int)" because "path" is null in KMP + Android project
Tools. Gradle. Native
KT-83598KotlinNativeDownloadTask build caching is unsafe
Tools. Maven
KT-79304Maven: Automatically add kotlin-stdlib dependencyKT-83111Add JavaVersion argument resolver for kotlin-maven-plugin-testKT-83112Add MavenVersion argument resolver for kotlin-maven-plugin-testKT-83565Maven: auto‑detect src/main|test/kotlin
Tools. REPL
KT-82741[K2 Repl] OOM inFirJavaElementFinderKt.collectAllDependentSourceSessionsTowhen rerunning the same cell multiple times
Tools. Statistics (FUS)
KT-82877Add performance measurement for KLIB size