github JetBrains/kotlin v2.5.0-Beta2
Kotlin 2.5.0-Beta2

pre-release2 hours ago

Changelog

Analysis API

  • KT-60484 Analysis API: add support for KtType pointers similar to KtSymbolPointer
  • KT-67786 Analysis API: Implement improved KtType hierarchy and design
  • KT-68462 Analysis API: Integrate project-structure module into analysis-api and analysis-api-platform-interface
  • KT-68341 Analysis API: Expanded function types from libraries don't have an abbreviated type
  • KT-68857 Analysis API: Refactor annotations
  • KT-65215 Analysis API: Distinguish APIs for Analysis API users and platforms
  • KT-68884 Analysis API: Rename/deprecate/remove declarations as part of Stabilization
  • KT-69055 Analysis API: Stabilize KaScopes
  • KT-61775 Analysis API: KtKClassAnnotationValue lacks complete type information
  • KT-60884 Analysis API: Improve standalone mode project model creation

Analysis API. FIR

Performance Improvements

  • KT-60240 K2: optimize FirElementBuilder#getOrBuildFirForNonKtFileElement for KtTypeReference case
  • KT-76375 ContextCollector: terminate search if no elements were found with a designation
  • KT-86758 Don't require body resolution to obtain an explicit backing field
  • KT-75496 Doesn't resolve the entire designation path to the body phase for diagnostics

Fixes

  • KT-74654 K2 Analysis API: InvalidFirElementTypeException with annotated non-local destructuring declaration
  • KT-81100 Support jvmTargetProvider in low-level analysis API
  • KT-75470 ContextCollector: potentially incorrect scope for super type call
  • KT-79057 Fix all // IGNORE_PHASE_VERIFICATION: invalid code inside annotations directives
  • KT-77041 Expected is FirResolvedDeclarationStatus, but was FirDeclarationStatusImpl
  • KT-60609 K2 IDE: Navigation to super class of annotation opens Any instead of written super type
  • KT-80721 K2 AA. "FirDeclaration was not found for class KtTypeParameter, fir is null" with generic type parameter in object expression
  • KT-64899 K2: PsiRawFirBuilder forces AST loading for scripts
  • KT-85627 AA: LLFlightRecorder initialization fails on runtimes without jdk.jfr
  • KT-86185 Analysis API: Make FirDesignation internal by removing the leak through UsualClassTypeQualifierBuilder
  • KT-85410 LLFirTypeTargetResolver: add more type guards
  • KT-88111 K2: Analysis API: make FileStructure element computation fully lazy

Analysis API. Infrastructure

  • KT-89711 test-data-manager is incompatible with Isolated Projects
  • KT-87672 Eliminate class duplication in the Analysis API JARs
  • KT-84914 Do not publish analysis-api-test-framework
  • KT-89119 Enforce KaInternals prefix name schema

Analysis API. Light Classes

  • KT-87399 LightClassUtil.getLightClassPropertyMethods returns wrong setter when JvmName annotation is used
  • KT-70427 SLC: non-abstract interface method generated as default with -jvm-default=disable option
  • KT-88498 Support multi-field value classes in light classes
  • KT-89316 SLC: DefaultImpls light class exposes @JvmStatic members of the interface companion object
  • KT-89322 UAST: NPE accessing containingFile of UParameter for mapped collection method
  • KT-89073 SLC: @JvmOverloads + @JvmExposeBoxed("bar") methods are exposed with the original name
  • KT-84373 Implement PsiMethod#isDefaultConstructor
  • KT-89204 SLC: False positive "unresolved reference" in Java for interface companion block members

Analysis API. PSI

  • KT-80780 KtPsiUtil#getEnclosingElementForLocalDeclaration should return KtClassBody for enum entries members
  • KT-89846 PSI: Kotlin overrides of standard PsiElement mutation methods throw IllegalStateException without KtPsiMutationService
  • KT-85052 Move mutation methods out of the Kotlin PSI
  • KT-88443 Advance DeprecationLevel for PSI declarations deprecated in 2026.2 and earlier

Analysis API. Providers and Caches

  • KT-71359 Perform validity checks before session acquisition
  • KT-89816 Analysis API tests: low-memory cache cleanup invalidates sessions in the middle of a test
  • KT-86402 False positive MISSING_DEPENDENCY_SUPERCLASS when using Scala case class in Kotlin

Analysis API. Standalone

  • KT-84851 Analysis API Standalone: 75% of CPU time spent in StringsKt.split via trie-based library scopes
  • KT-88362 PsiMethod.findSuperMethods() always returns an empty array
  • KT-61404 Analysis API: implement proper library publishing structure
  • KT-85112 AA does not see packages from unpacked klibs

Analysis API. Stubs and Decompilation

  • KT-80758 Consider to drop KotlinClassOrObjectStub#isLocal
  • KT-81203 Get rid of deprecated usage at ClsClassFinder.isKotlinInternalCompiledFile
  • KT-88772 Refine stubs surface
  • KT-89376 Rethink decompiler dependencies

Analysis API. Surface

New Features

  • KT-85384 Provide use-site-aware API for Light Classes
  • KT-88496 Support multi-field inline classes in Analysis API Surface
  • KT-78862 Provide KaSymbol -> PsiElement API

Fixes

  • KT-88129 Advance DeprecationLevel for declarations deprecated in 2026.2 and earlier
  • KT-73570 Merge implementation of KaExpressionTypeProvider.returnType with KaCallableSymbol.returnType
  • KT-86591 Rethink how the context parameters feature could be integrated into the Analysis API Surface
  • KT-82176 KaFirUsualClassType has incorrect type argument for generic local class in generic function
  • KT-66192 Analysis API: Improve render customizability
  • KT-83199 Clarify API around extension points
  • KT-77280 Rename KaPropertyAccessorSymbol#isCustom to isNotDefault
  • KT-60483 Analysis API: add isTailrec property to KtFunctionSymbol
  • KT-68882 Analysis API: Refactor KaSymbols
  • KT-55124 Design common ancestor for KtValueParameter and KtReceiverParameterSymbol
  • KT-53669 Analysis API: redesign KtSymbolOrigin to distinguish kotlin/java source/library declarations

Backend. Wasm

Performance Improvements

  • KT-88469 K/Wasm: consider inlining suspendCoroutineUninterceptedOrReturn and getCoroutineContext intrinsics on 2nd Stage

Fixes

  • KT-89394 [Wasm] stop creating of CoroutineImplStackSwitching at the call cite of suspendCoroutineUninterceptedOrReturn
  • KT-90119 K/Wasm: ArenaLikeAllocator.allocationsToFree is only cleared on freeAllComponentModelReallocAllocatedMemory()
  • KT-89267 K/Wasm: calling a (T) -> R lambda with an argument that isn't a T traps instead of throwing ClassCastException
  • KT-88235 K/Wasm: Grouping test infra causes d8: error reading module error on Windows (path length problem?)
  • KT-89657 [Wasm] Insvestigate performance issues with primitive box caching
  • KT-89548 [Wasm] clean up type codegen for stack switching and avoid leaking too many continuation types to non-stdlib modules
  • KT-89547 [Wasm] add test config for running stack switching with incremental compilation
  • KT-87742 K/Wasm: initialization of properties with default value different from JVM
  • KT-89315 K/Wasm Standard Library Tests: Assertions are not enabled
  • KT-89445 Wasm: non-thread-safe instruction cache causes ClassCastException during parallel compilation
  • KT-89345 [Wasm] look into and unmute some CallableReferences benchmarks for Single Module Mode
  • KT-86207 k/wasm: Add box tests/support for multi-value value classes and callable ref merging
  • KT-88291 K/Wasm: Unsigned integer division by zero throws RuntimeError instead of ArithmeticException
  • KT-87710 [K/Wasm] initialization order of companion objects from super types differs from JVM
  • KT-73452 K/Wasm: turning on range checks by default
  • KT-86242 K/Wasm: deprecate and prohibit using wasmExports

Compiler

New Features

  • KT-89201 Implement "Strict equality for structural classes"
  • KT-89096 Rich Errors: Parser & PSI
  • KT-89098 Rich Errors: Resolution
  • KT-89103 Rich Errors: Checkers
  • KT-89097 Rich Errors: FIR Tree
  • KT-80943 Context-sensitive resolution fails to look further than a type
  • KT-2264 Emit a warning about ignored (unused) binary operation result
  • KT-86868 Update checkers to support lateinit val

Compose compiler

Fixes

  • b/485865131 Removed deprecated IntrinsicRemember and StrongSkipping Compose feature flags
  • b/555304803 Fix parameter traversal in ComposableLambdaTokenizer.captureInsnCount
  • b/539644912 [Compose] Support rich callable references for @Composable functions
  • b/546101628 Fixed a bug that caused miscompilation whenever a when expression had a result that was computed by another when expression, and the inner when expression had a @Composable call in one of its conditions.
  • b/549552317 Fixed a bug that, in certain cases, prevented execution of non-local return statements inside lambdas called from when expressions.
  • b/481422057 Made the applier inferencer support repeated ComposableTarget annotations per the semantics described in the documentation of ComposableTarget
  • b/530458587 Start initializing the fields of ComposableSingletons objects lazily

Performance Improvements

  • KT-89840 Native: bad incremental clean build performance
  • KT-87570 Kotlin/Native: improve RemoveRedundantCallsToStaticInitializersPhase
  • KT-89224 Significant performance drop in MT intellij (checkers)

Fixes

  • KT-84904 Alpha release of Multi-Field Value Classes
  • KT-90352 K/N: with -Xcompanion-blocks-and-extensions, a Kotlin subclass of an Objective-C class fails to link (undefined $clinit_trigger of the ObjC supertypes)
  • KT-90235 Compiler (JVM): drop requirement of @JvmInline for inline value class
  • KT-90234 Compiler: don't report inline modifier is deprecated in combination with value
  • KT-90233 Compiler: allow inline value modifier combination
  • KT-89687 [JVM] SpecialBuiltinsMapping.getDifferentNameForJvmBuiltinFunction computes JVM signature of the sub-declaration instead of the overridden built-in
  • KT-89980 K2 loads full value classes from klibs without their value class representation
  • KT-89982 No warning for Kotlin/Native WeakReference and createCleaner on value class and primitive instances
  • KT-89983 Partial linkage doesn't report a value class whose superclass became an identity class
  • KT-89390 K/N IC: per-file caches are not invalidated when toggling -Xcompanion-blocks
  • KT-81760 Kotlin/Native: incosistent handling of clashing declarations
  • KT-90014 K2 / JVM: IllegalStateException: Don't know how to compile annotation value ERROR_CALL 'Unresolved reference: <Strange deserialized enum value: ...>' when delegating to a Java interface annotated with a nested Kotlin enum
  • KT-89655 Prohibit lateinit in companion blocks in interfaces
  • KT-89646 Add JVM target bytecode version 28
  • KT-86086 Make IntrinsicConstEvaluation feature stable
  • KT-87452 Fix remaining issues in companion blocks and extensions on JVM
  • KT-90169 Callable references: Array passed as a single vararg element for generic vararg function since 2.4.0
  • KT-89915 JVM: ClassCastException 'kotlin.Result cannot be cast to ...' in an indy SAM-converted lambda whose Java SAM parameter is @NotNull
  • KT-89698 JVM: @Throws is copied onto a bridge only when the overridden method is compiled from source, so incremental and clean builds produce different class files (JvmEnhancedBridges, 2.4.0)
  • KT-85853 CompanionBlocksAndExtensions: companion block val in interface generates illegal private static field (ClassFormatError 0x1A)
  • KT-89451 Suspend conversion: a null argument arrives non-null
  • KT-39697 "Cannot infer type parameter" in map with java static or global method reference
  • KT-89892 [K/N] latin1Strings binary option is ignored with caches
  • KT-86132 Drop support of language versions 2.0 and 2.1
  • KT-86793 setupCommonOptionsForCaches does not forward pagedAllocator (and other runtime constant options) to cache sub-compilations
  • KT-89461 KMP separate compilation: Incorrect fake-override is e/a mismatched in case of duplicated supertype in dependency class
  • KT-82548 K2: report a warning about annotations which target non-existent accessors
  • KT-87295 Enable Return Value Checker by default
  • KT-89410 Introduce WillBecomeValue annotation
  • KT-89232 Align context-sensitive resolution with how collection literals are resolved
  • KT-47891 JVM: "IllegalStateException: Bad exception handler end" with nested try/run/finally blocks
  • KT-89933 Incorrect highlighting of a KDoc with a code block with comments
  • KT-89576 PSI path in script compilation still depends on K1
  • KT-87596 Kotlin/Native: port calls checker to LLVM pass
  • KT-89313 DNN in supertype leads to compiler crash
  • KT-89416 Native: top-level properties are not initialized when checked for initialization state from another class
  • KT-89876 K/N IC: "File … is not found in cache" after a file is renamed or moved to another module (stale weak dependency)
  • KT-87856 Investigate failures in scripting tests after a full switch to K2
  • KT-87149 Drop K1-dependent parts of the scripting compiler plugin
  • KT-89769 FIR2IR throws "IR class for not found" when a class's supertype isn't exposed via api
  • KT-89751 K2 REPL: contracts of functions are not resolved inside REPL snippets
  • KT-89790 Improve error reporting around new compilation scheme
  • KT-87904 Incorrect $default method/constructor signatures when @JvmInline value class parameter type is absent from compilation classpath
  • KT-83498 Implement LT support in the K2 REPL
  • KT-86093 Context sensitive resolution does not apply if simple access is resolved to invisible qualifier
  • KT-34051 UnsupportedOperationException when using reified type inside lambda in inline function
  • KT-89837 Correctly evaluate name for declaration that are imported with different name
  • KT-89584 Build rich references for suspend conversion & SAM constructor references
  • KT-89770 KMP separate compilation reports EXTERNAL_TYPE_EXTENDS_NON_EXTERNAL_TYPE for external class extending JsAny
  • KT-75366 Provide proper keys for ScopeSession#getOrBuild usages
  • KT-74304 K2: WRAPPED_LHS_IN_ASSIGNMENT on annotations
  • KT-77583 K2: Support repl snippets with LightTree/KMP-based raw FIR building
  • KT-89834 Drop RawFirBuilderTotalKotlinTestCase.testPsiConsistency
  • KT-86380 New inline variables scheme: addition of this variable
  • KT-87777 K/N IC: "Undefined symbols for architecture" when an inherited open method becomes final
  • KT-81075 False negative MISSING_DEPENDENCY_SUPERCLASS on unresolved supertype of SAM constructor
  • KT-89168 Reflection: support getDelegate() for companion block properties in interfaces
  • KT-74793 Parser: Property accessor of a non-local destructuring declaration leads to exceptions
  • KT-83340 Investigate need of KtRegisteredDiagnosticFactoriesStorage component in AA mode
  • KT-89762 KMP Separate Compilation: EXPECT_ACTUAL_IR_MISMATCH caused by accessing a java field in a single platform project
  • KT-89635 False "Return type mismatch" in interface delegation when the delegated function with an implicit return type is declared in another file
  • KT-89341 KMP separate compilation: false-positive EXPECT_ACTUAL_IR_MISMATCH on members of inner class with generics in outer class
  • KT-89744 Apostrophe in an escaped identifier corrupts ARGUMENT_TYPE_MISMATCH diagnostic rendering
  • KT-89121 [Native] @BindClassToObjCName adapters from a cached module never reach Kotlin_ObjCExport_sorted{Class,Protocol}Adapters
  • KT-83419 K2: CCE when inline lambda changes a var involved in an implies contract
  • KT-89063 JvmExposeBoxed allows to generate invalid Java method names
  • KT-89068 JvmExposeBoxed: secondary constructor of inline class is never exposed
  • KT-89476 Diagnostic for incorrect @EagerInitialization usage
  • KT-89653 Native: failing lldb tests with state checker enabled
  • KT-89407 When frontend reports diagnostic on null source, report as sourceless diagnostic
  • KT-82900 Language Feature EnhancedBridgesGeneration
  • KT-20245 NoSuchFieldError on usage of crossinline lambda in anonymous object inside another anonymous object in inline function
  • KT-89641 Verify JS export works for full value classes
  • KT-80383 Getter without a body is allowed on a property with an explicit backing field
  • KT-89415 Refactor logic around FirParser.LightTree/MultiplatformParsing and USE_LIGHT_TREE configuration flag
  • KT-87569 Support Valhalla for Kotlin Inline and Full Value Classes
  • KT-87531 AbstractMethodError on intersection override with @JvmField property when accessing property through interface
  • KT-89642 Disable feature typed equals in value classes for full value classes
  • KT-81558 Context-sensitive resolution cannot resolve an unqualified enum entry in Gradle Property<T>-like cases
  • KT-83304 Context sensitive resolution doesn't work on mutable collection operators (no explicit import from enum)
  • KT-89504 VerifyError: Bad type on operand stack with startCoroutine on smart-casted nullable suspend function type
  • KT-84406 Remove support for IR serialization in JVM
  • KT-84562 Get rid of usages of @K1Deprecation-annotated declarations in JVM backend
  • KT-89325 Java Direct: no supertypes on resolution due to reentrance
  • KT-86095 "VerifyError: Bad type on operand stack" when inline+crossinline function returns anonymous object overriding internal suspend fun with yield()
  • KT-89430 Don't store raw-fir generated tests in git
  • KT-88081 Normalize Double.NaN and Float.NaN after constant evaluation
  • KT-89433 Frontend: Metadata of abstract/sealed full value classes declares equals/hashCode/toString that the JVM backend does not generate
  • KT-89533 class KtValueArgument is not a subtype of class KtCollectionLiteralExpression for factory UNRESOLVED_COLLECTION_LITERAL
  • KT-88589 Full Value Classes: irrelevant SMARTCAST_IMPOSSIBLE for value class implemented in another module
  • KT-89206 Inlining of TODO() as a default value leads to an internal error
  • KT-89157 Remove temporary useless casts introduced by KT-79212
  • KT-73165 "ANNOTATION_ARGUMENT_MUST_BE_CONST" caused by Enum name as a constant in Annotation
  • KT-89466 KMP Separate Compilation: NoSuchElementException in case of classpath substitution
  • KT-79562 NPE when passing non-lambda argument of nullable non-suspend function type into function that accepts nullable suspend function type
  • KT-86282 Implement FIR builder based on KMP parser
  • KT-89391 KMP separate compilation: false-positive EXPECT_ACTUAL_IR_MISMATCH on declarations from friend dependencies
  • KT-89475 Missed MISSING_DEPENDENCY_SUPERCLASS for parameters of value classes
  • KT-89259 Collection literals: enabling +CollectionLiteralsBasedAnnotationResolution causes MISSING_DEPENDENCY_CLASS
  • KT-82959 IllegalArgumentException: Unhandled intrinsic in ExpressionCodegen for generated top-level declarations
  • KT-85104 JVM compilation error when having TODO() as a parameter default value of an inline function when adding a call to it
  • KT-85168 Generate static initializers as proper IR functions
  • KT-89457 companion block on @JvmRecord class cannot be compiled
  • KT-89453 INVALID_NON_OPTIONAL_PARAMETER_POSITION ignores expect-chain defaults
  • KT-70118 [KLIB Resolve] Stop using depends= property of klib manifest when building caches in Native
  • KT-86888 Update PersistentMultimap to follow persistent collection naming conventions
  • KT-84001 KIAEWA: Exception in type checkers when classpath contains newer Kotlin-compiled dependencies
  • KT-88520 Equality applicability checker should account for custom equals in full value classes
  • KT-89374 Companion blocks: false positive PROPERTY_WITH_BACKING_FIELD_INSIDE_VALUE_CLASS for property inside companion block of value class
  • KT-89112 Move transformation arrayOf(...) -> [...] in annotations to constant evaluator
  • KT-74051 Add a Continuation for tail-call suspend functions
  • KT-81874 NPE related to data race during Application disposal
  • KT-63741 K2: fix visibility inference with overridden + inherited member
  • KT-46419 FIR: Investigate how integer-literal resolution works
  • KT-6843 NPE in REPL
  • KT-10001 False unnecessary non-null assertion on a pair element

IR. Tree

  • KT-89203 IR validation: New checker to prohibit use of legacy Ir*Reference nodes on 1st compilation stage
  • KT-87442 [IR] Introduce 1st stage warning on failed tailrec optimization
  • KT-87836 Make sure that type, value and kind in IrConst are coherent
  • KT-88082 Do not allow constant folding if the resulting expression is Double.NaN and Float.NaN
  • KT-87954 Use kotlinLibrary from IrModuleFragment instead of a library from ModuleDescriptor

JVM. Reflection

New Features

  • KT-84275 Support companion blocks & extensions in reflection
  • KT-42082 Ability to retrieve a container/owner class of the KProperty/KFunction
  • KT-87955 Reflection support for contextualized callable references

Fixes

  • KT-89918 Reflection: IllegalStateException while processing the times overload during Duration property lookup
  • KT-80710 Reflection: change KCallable representation to avoid dependency on K1
  • KT-89280 NoSuchElementException in argumentsMakeSenseOnlyForMutableContainer for Java non-static inner class of generic outer class
  • KT-89956 KClass.isValue of mapped builtins like kotlin.Number ignores that their Java class is a value class
  • KT-89952 Reflection fails with NoSuchElementException when an inline class wraps a full value class
  • KT-89949 Reflection treats full value classes and Java value classes as inline classes when calling functions
  • KT-88503 KType.isMarkedNullable always returns false for @Nullable-annotated Java parameters in K2 reflection implementation
  • KT-85735 Reflection: Java wildcard type based on Kotlin type with declaration-site variance is loaded differently in new implementation
  • KT-89732 Reflection: IllegalStateException in CovariantOverrideComparator for Java interface inheriting both raw and generic method with same erasure
  • KT-89019 Reflection: Java Enum.valueOf(value) has lost its parameter name
  • KT-89419 Reflection: parameter annotations on bound constructor reference are loaded incorrectly
  • KT-89000 KotlinReflectionInternalError on Array size.getter.annotations

JavaScript

New Features

  • KT-87029 ⁠[Effect Analysis] Leverage effect analysis results in DCE to delete unused properties' initializers
  • KT-87027 [Effect Analysis] Propagate effects across the call graph based on function body calls
  • KT-87026 ⁠[Effect Analysis] Introduce a lowering for analyzing mutation of inputs and outer state
  • KT-87024 [Effect Analysis] Mark up kotlin-stdlib declarations with effect annotations
  • KT-88024 KJS: Allow exporting interfaces nested in other interfaces to JavaScript

Performance Improvements

  • KT-89682 K/JS & K/Wasm: Initialize trivial objects eagerly even in dev mode

Fixes

  • KT-89984 JS: nullable value class over a nullable type parameter holding null is treated as null
  • KT-89978 JS and Native box single-field full value classes and call equals() when comparing them with ==
  • KT-89920 K/JS: Adapted ::ulongArrayOf reference does not unbox ULong arguments, producing a corrupted ULongArray
  • KT-89919 KJS: "Unhandled JavaScript exception: array.slice is not a function" when using non-adapted ::uintArrayOf
  • KT-89449 Kotlin/JS: Member names no longer minified in production
  • KT-89290 Web: companion block members are not initialized when observed from a nested class
  • KT-49422 Fix test about support of DefinitelyNotNull type in backends
  • KT-64821 KJS: "TypeError: * is not a function" with class which extends suspend lambda
  • KT-83337 KJS: Difference in behavior on nested class initialization
  • KT-88343 KJS: Report JS_MODULE_PROHIBITED_ON_VAR when @file:JsModule` is present
  • KT-89591 JS plain objects: generated top-level invoke/copy leak visibility for internal interfaces
  • KT-85540 Drop longArrayClass definitions from boxedLong.kt and longAsBigInt.kt
  • KT-72720 Setp up a nightly test suite for running all JS compiler tests with -Xir-generate-inline-anonymous-functions
  • KT-89372 KJS: Run the second DCE pass after the optimization pipeline
  • KT-85047 Kotlin/JS: @JsStatic on suspend fun of class companion generates incorrect d.ts

Klibs

  • KT-86840 KLIBs: Implement a component inside the compiler to compute DAG of dependencies for a given set of libraries
  • KT-89276 KLIBs: Check remaining usages of KlibMetadataProtoBuf.Header in compiler's source code
  • KT-89921 klibs: failure with two identical static inline functions in the same file in different classes
  • KT-89498 IR linker performance: IrFileDeserializerImpl.getAllMatchingSignatures()
  • KT-89825 K/N: "IrClassSymbolImpl is already bound" when two cinterop libraries in the same package declare the same C struct
  • KT-87487 KLIBs: Don't serialize empty metadata package fragments
  • KT-89482 [KLIB] Introduce special signature indices in regular & C-interop Native KLIBs
  • KT-81624 [KLIB Resolve] Kotlin/Native: -no-default-libs may lead to the final binary depending on a lot of system frameworks
  • KT-61096 [KLIB Resolve] Drop KLIB resolve inside the Kotlin/Native compiler
  • KT-87387 Fix K1 API usage in :kotlin-util-klib-metadata

Language Design

  • KT-12719 Must-use return values: warn about unused return values

Libraries

New Features

  • KT-24908 CodePoint value class
  • KT-83426 Add Tau=2*Pi to the stdlib
  • KT-89662 Stabilize Uuid.Companion.generateV{4,7}
  • KT-89629 Make some of the Timer.schedule overloads ignorable
  • KT-87021 ⁠[Effect Analysis] Introduce a new annotation for marking stdlib functions
  • KT-89332 kotlin-metadata: stabilize RVC-related API

Performance Improvements

  • KT-89899 K/Wasm: Optimize Double.ulp
  • KT-71987 Float.ulp can be optimized for Native

Fixes

  • KT-48530 Asymmetric equality for progressions and ranges
  • KT-89174 Incorrect exception type documented in random function for ranges
  • KT-56363 Kotlin/Native: NativeRandom does not behave well with multiple threads
  • KT-88241 kotlin-metadata-jvm: Consider renaming isStatic to isCompanionBlockMember
  • KT-89560 Make kotlin.concurrent.thread's return value ignorable
  • KT-85126 Increase StringBuilder.append(obj: Any?) deprecation level to ERROR
  • KT-89177 Aggregate functions accepting a destination collection should be annotated with IgnorableReturnValue
  • KT-82882 Migrate kotlinx-benchmarks Gradle plugin from KLIB resolver to KlibLoader API
  • KT-64377 Update Dokka Gradle integration tests build configuration
  • KT-64200 Dokka Integration tests refactoring
  • KT-64916 Update Dokka build config to use JB Gradle Enterprise

Native

  • KT-85131 Native: freeze in LLVMGetTargetFromTriple during a parallel test run
  • KT-89541 K/N: Enabling -Xcompanion-blocks in stdlib breaks some callable reference tests with OPT, NO_CACHE
  • KT-89355 Kotlin/Native: some benchmarks are missing
  • KT-87872 Native: a few tests in ObjCToKotlinSteppingInLLDBTest fail with Xcode 27
  • KT-87869 Native: Xcode 27
  • KT-89637 K/N: Linking of linux (x64/arm64) binaries with cinterop on Windows is failing
  • KT-84955 Deprecate apple x86_64 targets as Error
  • KT-89258 Kotlin/Native: mute volatile benchmarks

Native. C Export

  • KT-89632 [K/N][CExport] Header declaration order depends on -Xinclude order

Native. C and ObjC Import

  • KT-89463 Native: 'Unable to compile C bridge' when implementing UIScreenshotServiceDelegateProtocol
  • KT-89401 K/N: NPE in IrLazilyBoundAnnotationImpl when a cinterop klib references an annotation from a regular klib

Native. ObjC Export

  • KT-89981 Building an Objective-C framework fails with single-field full value classes in the API
  • KT-70626 ObjCExport: init constructors order in Throwable

Native. Swift Export

Fixes

  • KT-88251 Swift Export cross-language inheritance example cannot instantiate KotlinBase
  • KT-89647 Native: failing test with state checker on
  • KT-90024 [Swift Export] improve compilation performance of Swift Export
  • KT-89702 Swift Export: reverse bridge calls a member named init without backticks
  • KT-89728 Swift Export: Prohibit exporting objc-imported protocol conformances on kontlin types
  • KT-89701 Swift Export: sealed-type switch references a subtype nested in an internal class
  • KT-89842 [Swift Export] extensions of Unavailable type results on conflicts
  • KT-89839 [Swift Export] there could be more than one incoming cinterop
  • KT-89159 [Swift export] val to var property override is unreadable: "ambiguous use" on the subclass, base value returned via the superclass
  • KT-88256 Swift Export: constructor of a Kotlin subclass with renamed params causes 'error: argument labels for initializer do not match'
  • KT-88259 Swift Export [Inheritance]: toString/hashCode/equals cause EXC_BAD_ACCESS on Swift subclass of an exported Kotlin class
  • KT-88277 Swift Export [Inheritance]: function override with lambda parameter is ignored

Tools. Build Tools API

  • KT-89804 Protect build-tools-api-jps compatibility with an API dump
  • KT-89615 Support daemon mode in the JPS-only BTA API surface for client-managed incremental JVM compilation
  • KT-89673 Use Path instead of String for file paths in the JPS BTA tracker API
  • KT-89513 Introduce the JPS-only BTA API surface for client-managed incremental JVM compilation
  • KT-84229 Build reports missing memory metrics and incorrect in-process strategy indicators with BTA

Tools. CLI

  • KT-88174 Show error when running the compiler on JDK < 17
  • KT-89800 KMP Separate Compilation: Single-JVM-target commonTest cannot reference jvmMain with separate compilation
  • KT-89727 EXPECT_ACTUAL_IR_MISMATCH when using separateCompilation=true
  • KT-88475 IncrementalCompilationComponents instances are not being called anymore
  • KT-89211 Show warning when running the compiler on JDK < 17
  • KT-89356 Check that CLI arguments configuring already-deprecated/removed language features are deprecated/removed themselves
  • KT-73967 JDK 25: "IllegalArgumentException: 25-ea" with EA builds

Tools. Compiler Plugin API

  • KT-68878 AA: LLFirIdePredicateBasedProvider can return declarations from dependant modules

Tools. Compiler Plugins

New Features

  • KT-76529 Support lombok.fieldDefaults.defaultPrivate in Lombok plugin

Fixes

  • KT-89189 @EqualsAndHashCode on a Kotlin class must generate canEqual
  • KT-83329 Lombok. The case where the default builder is hidden as an internal and an auxiliary one is created doesn't work from kotlin
  • KT-89973 all-open makes value classes open, causing "Value class cannot be open" errors
  • KT-89972 no-arg reports a redundant superclass error on inner classes it already rejects
  • KT-89971 no-arg plugin silently generates zero-argument constructors for value classes
  • KT-89970 Parcelize assigns fields of a value class after super() in Valhalla mode
  • KT-79199 Add K/N FIR dump tests to atomicfu compiler plugin
  • KT-89117 Lombok: NoSuchMethodError when using Java class annotated with Builder and Singular in Kotlin and with lombok.singular.useGuava=true
  • KT-89045 Lombok: some java.util.* collections supported in Java as @Singular targets are not supported in Kotlin
  • KT-89084 Lombok: lombok.singular.useGuava=true is not working for Kotlin collections
  • KT-88904 Lombok: Builder annotation generates invalid IR for generics with type-parametrized upper bound
  • KT-83273 Lombok. The inner builder class is unavailable in kotlin
  • KT-89753 Lombok: StackOverflowError when a Java class uses its own nested annotation on a member
  • KT-88941 Lombok: KotlinIllegalArgumentExceptionWithAttachments in the IDE when @NoArgsConstructor or @Builder is applied to a Kotlin class
  • KT-89185 Lombok: toBuilder() silently drops a builder field with no property to read, where Lombok reports an error
  • KT-89218 Lombok: no diagnostic when @Builder.Default or @Singular is applied to a body-declared property of a Kotlin class
  • KT-88848 Lombok: AssertionError when applying Builder annotation to a local class
  • KT-89024 Lombok: ClassFormatError when loading class annotated with @Builder(builderMethodName="")
  • KT-88852 Lombok: RuntimeException if Builder is applied to an inner class
  • KT-89027 Lombok: @Builder(access = AccessLevel.PRIVATE) in Kotlin produces unusable builder class
  • KT-89040 Lombok: no diagnostic and no codegen when @Builder applied to top-level functions
  • KT-88891 Lombok: Builder annotation generates setters for properties declared in a class body that do not work
  • KT-88814 Lombok: InstantiationError when using Builder with abstract or sealed class
  • KT-71791 [AFU plugin] Improve illegal use cases handling
  • KT-89412 Add kotlin-atomicfu-compiler-plugin to .zip compiler distribution
  • KT-88276 REDECLARATION conflicts with the existing nested 'Companion'
  • KT-86652 Lombok: introduce NO_NOARG_CONSTRUCTOR_IN_SUPERCLASS for @NoArgsConstructor
  • KT-86915 Support for multiple annotations on the same class
  • KT-89133 Lombok: no navigation from a generated @Builder member to the property it is generated from
  • KT-89152 Lombok: use kotlin.test assertions in the plugin's test data instead of the hand-rolled assertEquals
  • KT-89162 Lombok: @Builder on a method generates nothing in the IDE because the annotation is read off unresolved FIR
  • KT-89169 Lombok: constructor annotations on a Java inner class produce an uncallable constructor
  • KT-88707 Lombok: FileAnalysisException when creating an instance of an inner class with NoArgsConstructor
  • KT-88659 Lombok: RuntimeException when NoArgsContructor/Builder are applied to a class with non-property parameter in a primary constructor
  • KT-88729 Lombok: flagUsage does not report erros/warnings for constructor-related annotations used in Kotlin

Tools. Compiler plugins. Compose

  • KT-89681 [WEB] Expression uses unlinked type parameter symbol
  • KT-89969 Compose ignores the stability configuration file for value classes
  • KT-89968 Compose infers abstract and sealed value classes as unstable instead of uncertain
  • KT-89958 Compose ignores type arguments of generic value classes when inferring stability
  • KT-89961 Compose crashes with StackOverflowError on a recursive full value class
  • KT-89957 Compose infers full value classes with uncertain properties as stable

Tools. Compiler plugins. Serialization

  • KT-81042 Warn when Proto* annotations are applied to properties of inappropriate type
  • KT-69488 Serialization: plugin should print a diagnostic or a warning when misusing @Serializable(with=...)
  • KT-55738 Report a diagnostic when @Serializable class already has a serializer() function in companion with signature that matches plugin-generated
  • KT-66462 Report a warning when the serializable class has a private companion
  • KT-89275 Kotlin/Wasm: Invalid Wasm is emitted for a @Serializable generic class with a class upper bound
  • KT-89643 Fix Protobuf tag reuse for full value classes
  • KT-59088 KJS / Serialization: Report a compiler error if @Serializable class contains a property with dynamic type
  • KT-69067 K2 + Serialization: provide a warning when plugin-related annotations are typealiased
  • KT-73207 Report a compiler error when @Serializable(with) is applied and number of generic parameters does not match
  • KT-71680 Report a warning when @Serializable public class has private serializer

Tools. Daemon

  • KT-83117 Daemon mode: Clear jar caches at the end of the build

Tools. Gradle

New Features

  • KT-81782 Enable CRI by default
  • KT-74808 Add Gradle DSL option for enabling unused return value checker
  • KT-88601 Warn user on non-publishable targets when Kotlin Archive is enabled
  • KT-88529 Support compatibility mode with direct dependencies on platform components in KGP

Fixes

  • KT-90111 Add missing generated files to 2.5.0 branch
  • KT-88594 Compatibility with Gradle 9.8 release
  • KT-87910 Implement Kotlin Archive (.kar) publication format
  • KT-87987 Consume Swift Export metadata for published external dependencies
  • KT-87990 Add consumer dependency overrides to Swift Export Xcode integration
  • KT-89323 Consume Swift Export metadata for project dependencies
  • KT-85434 Gradle: drop support for non-BTA JVM compiler execution mode
  • KT-84114 Bump the minimal supported Gradle version to 8.14.x
  • KT-89340 Adopt sources.jars publication to Kotlin Archive
  • KT-87558 Gradle: Remove property for disabling usage of non-packed klibs
  • KT-88785 Gradle: Remove kotlin.internal.classpathSnapshot.parseInlinedLocalClasses
  • KT-88619 Bump minimal supported AGP version to 8.8.2
  • KT-88609 Cleanup declarative Gradle prototype from ecosystem plugin
  • KT-88583 Kapt may unexpectedly load conflicting dependencies from the Gradle runtime classpath
  • KT-73968 KotlinDependencyManagement tries to mutate configuration after it was resolved

Tools. Gradle. JS

New Features

  • KT-88882 Reimplement Node.js provisioning in KGP
  • KT-88868 Rework declaration and collection of npm dependencies in KGP
  • KT-87087 Integrate Analysis API based TypeScript generation into the KMP Gradle plugin as a separate task
  • KT-89230 Expose allBrowserTestRunners as gradle named domain collection
  • KT-88856 KGP/JS/Playwright: Provide Gradle test filtering arguments in KotlinJsTestsLocation

Fixes

  • KT-89605 Use nodeJsToolchain in all tasks for nodeExecutable
  • KT-88431 Playwright JS tests don't run on Linux/ARM
  • KT-88592 Reporter option 'alsoWithHtml' has no effect. Because custom reporterOptions.Base was provided. In node-js tests
  • KT-85440 Remove kotlin-js plugin
  • KT-89734 Update JS tooling dependencies
  • KT-86683 Use npm-installed mocha.js instead HTTP loaded variant in JS Browser test pipeline
  • KT-89508 JS/Wasm: Remove deprecated properties in NodeJsRootExtension
  • KT-89404 wasmJs browser test returns timeout and cant load mocha.js and mocha.css because they are missing in the ems bundle

Tools. Gradle. Multiplatform

  • KT-89563 KGP doesn't work with the new xcproj Xcode project format
  • KT-84736 SPM import: the package name for the included build is just an underscore
  • KT-89413 Multiplatform: jvmTest reports omit JUnit TestReporter.publishEntry entries on Gradle 9.4+
  • KT-89900 Disable partial resolution diagnostic in large projects
  • KT-86666 Metadata (aka e.g. commonMain) unique_name does not include group prefix
  • KT-87513 Error deprecation for watchosArm32 target
  • KT-89878 Raise deprecation to error for 'withJava()' API
  • KT-86611 Deprecate hidden kotlin.mpp.freeCompilerArgsForSourceSet property

Tools. Gradle. Native

  • KT-89265 K/N: Gradle 9.8 reports "Using the enum type KotlinNativeBundleArtifactsTypes as an attribute value type has been deprecated"
  • KT-89480 Changing swift export visibility doesn't affect incremental builds
  • KT-89622 cleanSwiftImportFingerprintArtifacts fails to parse a fingerprint left by 2.4.20 after upgrading to 2.5.0-Beta1

Tools. Gradle. Swift Export

New Features

  • KT-78747 Swift export for SPM
  • KT-89803 Swift package generation for Swift Export
  • KT-85687 [Swift Export - Gradle] Add exposed and hidden dependency visibility overrides

Fixes

  • KT-90365 Swift Export: rename Gradle properties to follow the naming conventions
  • KT-90020 Swift Export: OutOfMemoryError in SwiftExportAction because of default 512 MB worker heap
  • KT-90132 Swift Export: Swift package export fails when Apple targets export different modules
  • KT-89393 Report SwiftExportUnsupportedMetadataSchemaVersion when processing metadata from KotlinProjectSharedDataProvider
  • KT-89495 Changes in published metadata not picked up by Swift Export task
  • KT-89805 Wire settings from the new Swift Export DSL into the Swift Export run
  • KT-89720 Add Swift Export metadata artifact to .kar archive
  • KT-89812 Run Swift Export once per target and declare the outputs of its tasks
  • KT-89680 [Swift Export] Types from a transitive spm dependency are not exported
  • KT-89354 embedSwiftExportForXcode can never be a no-op
  • KT-89379 Remove the ExperimentalExportDsl opt-in annotation
  • KT-89289 Move SwiftExportConfigurationCompat into the internal package
  • KT-88987 Add an example to the documentation for the export.swift.rootPackage DSL property

Tools. Gradle. Wasm

  • KT-89269 KGP/JS/Playwright: "Failed to load Kotlin WASM JS tests entry point TypeError"
  • KT-87136 K/Wasm: Add possibility to have a distribution without webpack
  • KT-89832 K/Wasm: deprecate node for wasmWasi
  • KT-89521 wasmJsTestBundleAsEsm fails instead of being skipped when there are no test sources
  • KT-84258 K/Wasm: Remove deprecated properties in BinaryenExec
  • KT-89856 K/Wasm: update Binaryen to 133
  • KT-89813 K/Wasm: Update wasmtime to 49.0.1
  • KT-89510 Wasm: Promote declarations deprecations
  • KT-87562 K/Wasm: remove ExperimentalWasmDsl from wasm-js target-related declarations KGP

Tools. Incremental Compile

  • KT-90060 Kotlin/JS: Internal compiler error "IrClassSymbolImpl is unbound. Signature: kotlin/Unit|null[0]" with incremental compilation
  • KT-88539 Incremental JS Klib compilation tests fail with LV 2.4+
  • KT-89912 Kotlin 2.4.20: JS/Wasm IC fails removing FIR-generated hint, then falls back to a full rebuild
  • KT-90019 IC: Classpath snapshot shrinking builds the reverse-impact resolver even when no classpath classes are referenced
  • KT-89336 IC: inferred interface member return type is not recompiled when its underlying type changes
  • KT-89044 K2 KMP JVM IC: Actual typealias overload change ignored by incremental compilation
  • KT-89300 K2 KMP JVM IC: Interface delegation causes IllegalStateException
  • KT-89342 Investigate potential performance improvement for IC classpath snapshotting

Tools. JPS

  • KT-89464 Compilation fails with NoClassDefFoundError in UtilsKt
  • KT-88702 Support incremental dumb-mode compiler execution with providing tracker data output for JPS
  • KT-89569 Remove copied APIs from JPS

Tools. Kapt

  • KT-70784 Consider using LightTree instead of PSI in K2 Kapt
  • KT-89349 Investigate failures in KAPT tests if one enables +CLBasedAnnotationResolution
  • KT-88608 KAPT: Do not generate JTree in direct mode

Tools. Maven

  • KT-90004 Maven and Gradle tests fail after scripting runtime migration

Tools. Performance benchmarks

  • KT-87324 K/N: Add runtime benchmarks for release caches

Tools. REPL

  • KT-86291 Drop GenericReplCompiler
  • KT-89748 K2 REPL tests: in-process and Analysis API REPL runners keep failed snippets in the history
  • KT-89747 K2 REPL: a snippet failing after resolution stays in the history and consumes a snippet number
  • KT-89750 K2 REPL: UNINITIALIZED_VARIABLE is not reported for snippet properties
  • KT-89749 K2 REPL: UNRESOLVED_REFERENCE to a previous snippet's class in a function with an implicit return type
  • KT-87432 Implement JSR-223 variant on K2 compiler that compiles out of process
  • KT-89459 Remove -Xrepl option from kotlinc

Tools. Scripts

  • KT-90298 JSR-223: ENGINE_SCOPE/GLOBAL_SCOPE bindings are lost after the ScriptContext is replaced
  • KT-90299 JSR-223: post-GC heap growth per evaluated snippet is ~6x higher in 2.5.20-dev-1225 than in 2.4.10 and ~3x higher than in 2.5.0-Beta1
  • KT-90244 Scripting, JSR-223: Each new ScriptEngine or ScriptContext retains its K2 compiler environment, leading to OutOfMemoryError
  • KT-89627 K2: a script processed before its definition's package sources causes 'Unresolved reference' in that package
  • KT-89220 JSR-223: generic Java bindings break all subsequent eval() calls
  • KT-89247 Kotlin Script: NoClassDefFoundError on 2nd execution with transitive dependency from imported script
  • KT-42101 Scripts: @file:Import() in kotlin-main-kts uses a stale cache
  • KT-90022 The completion doesn't work in main-kts scripts in IJ
  • KT-89752 JSR-223 (K2): the engine's snippet number (repl.currentSnippetNo) is ignored by the compiler
  • KT-74354 Implement (and use) expected exceptions processing in K2 REPL tests

Tools. Statistics (FUS)

  • KT-88686 Add FUS metrics to the new Swift Export DSL

Don't miss a new kotlin release

NewReleases is sending notifications on new releases.