github JetBrains/kotlin v2.3.0-Beta1
Kotlin 2.3.0-Beta1

latest releases: build-2.3.0-dev-10354, build-2.3.0-dev-10352, build-2.3.0-dev-10303...
pre-release9 hours ago

Changelog

Analysis API

  • KT-80303 Move :native:analysis-api-klib-reader to :libraries:tools

Analysis API. Code Compilation

  • KT-80227 Support unnamed context parameters in evaluation
  • KT-78554 K2 IDE / Kotlin Debugger: ISE “No override for FUN IR_EXTERNAL_DECLARATION_STUB” on calling toString() for local class instance during evaluation
  • KT-73201 K2 IDE: Error while evaluating expressions with local classes

Analysis API. FIR

  • KT-46375 Analysis API: Support cross-file class redeclaration checks using indices
  • KT-80471 Analysis API: Deduplicate equivalent call candidates in resolveToCallCandidates
  • KT-79653 [Analysis API] ContextCollector: BODY context of enum classes doesn't contain enum entries
  • KT-75858 K2 AA: False positive 'property must be initialized' on incremental analysis with 'field' usage and semicolon in setter
  • KT-80231 AnnotationArgumentsStateKeepers doesn't restore the initial annotation in some cases
  • KT-80233 Pull mutation out of AnnotationArgumentsStateKeepers
  • KT-71466 LLFirBuiltinsSessionFactory uses createCompositeSymbolProvider
  • KT-76432 JavaClassUseSiteMemberScope: Expected FirResolvedTypeRef with ConeKotlinType but was FirUserTypeRefImpl

Analysis API. Infrastructure

  • KT-80717 Support IntelliJ Bazel build in the Kotlin Coop development mode

Analysis API. Light Classes

  • KT-80656 Duplicate no-args constructor in PSI
  • KT-60490 Symbol Light Classes: Property accessors from a delegated interface don't present in the delegating class
  • KT-79689 SymbolLightClassForClassLike.toString() causes PSI tree loading
  • KT-79012 Add a high-level overview of light classes

Analysis API. Providers and Caches

  • KT-78882 K2 AA: Calling containingSymbol on getProgressionLastElement causes exception
  • KT-58325 Analysis API: Combine LLKotlinStubBasedLibrarySymbolProviders in session dependencies (optimization)
  • KT-77825 Analysis API: CheckersComponent consumes a lot of memory while being unused in LL FIR sessions
  • KT-76526 Incorrect built-in module is provided for non-JVM sources in Standalone
  • KT-62549 Analysis API: Cache callables in combined Kotlin symbol providers
  • KT-70721 LL FIR: investigate possibility of moving LLFirFirClassByPsiClassProvider . getClassByPsiClass (PsiClass) to symbol providers
  • KT-72998 Analysis API: Introduce getClassLikeSymbolByPsi to LL FIR symbol providers

Analysis API. Standalone

  • KT-80573 Potential performance issue on class ID computation
  • KT-80559 Try to optimize KotlinStandaloneDeclarationProviderFactory startup for tests
  • KT-71706 Analysis API Standalone: StandaloneProjectFactory.createSearchScopeByLibraryRoots creates inefficient file-based search scopes

Analysis API. Stubs and Decompilation

Performance Improvements

  • KT-77097 Support ReplaceWith deprecation annotation argument via stubs

Fixes

  • KT-77082 StackOverflowError in CreateFreshTypeVariableSubstitutorStage.shouldBeFlexible
  • KT-80798 Improve stubs tests coverage
  • KT-75318 Read context parameter fields from metadata in CallableClsStubBuilder
  • KT-77874 AA disagrees with the compiler on descriptions of context parameters from binaries in messages for context argument ambiguity errors
  • KT-80350 Drop K1 decompiler
  • KT-80276 Implement native coping for stubs
  • KT-79780 Decompiled MultifileClass has Facade kind
  • KT-79398 isClsStubCompiledToJvmDefaultImplementation flag is inconsistent for compiled and decompiled stubs
  • KT-79798 Prettify stub usages in LL stub-based deserializer
  • KT-78949 AbstractLLStubBasedResolutionTest: tests against real stub-based files
  • KT-80251 Inconsistent decompiled and compiled stub for properties with an initializer and a delegate
  • KT-74547 Implement decompiler for K2
  • KT-79555 Move KotlinFileStubImpl serialization/deserialization to the Analysis API
  • KT-79487 "null DefinitelyNotNullType for 'T'" from decompiler
  • KT-60764 Stub Builder: fix differences between K1 and K2 stub building on decompiled files
  • KT-79484 An empty enum class with a member decompiles with a synthetic error
  • KT-79730 Decompiled files have an extra Kt suffix
  • KT-79483 data modifier is not present on object modifier
  • KT-75398 Local classes from scripts have ClassId in stubs
  • KT-79412 Context parameters with type annotations cause inconsistency errors while building stubs

Analysis API. Surface

New Features

  • KT-64340 Analysis API: no way to get a type of vararg parameter
  • KT-68387 AA: provide context for type approximations

Performance Improvements

  • KT-80713 Optimize KaDeclarationSymbol#visibility for class-like symbols
  • KT-79097 KaFirNamedFunctionSymbol#isSuspend shouldn't trigger resolution
  • KT-79095 isOverride shouldn't trigger resolution if not compiler plugins present

Fixes

  • KT-78093 Add bridges for context parameters
  • KT-79328 K2 AA, isUsedAsExpression: Unhandled Non-KtExpression parent of KtExpression: class org.jetbrains.kotlin.psi.KtImportDirective
  • KT-80366 IllegalStateException from KaFirStopWorldCacheCleaner
  • KT-80274 Merge AbstractMultiModuleSymbolByPsiTest to AbstractSymbolByPsiTest
  • KT-80352 KaBaseResolutionScope.contains(PsiElement) always returns false for Android light classes (e.g. synthetic R.java classes)
  • KT-80234 Incorrect value of isActual for the implicitly actual constructor of annotation class
  • KT-80178 Incorrect modality for an abstract interface function with a redundant open modifier
  • KT-79129 [Analysis API] KaFe10TypeCreator.buildClassType cannot build builtin types by class ids
  • KT-79143 AA: argumentMapping contains an expression that is not an argument
  • KT-59857 KaExpressionTypeProvider#returnType shouldn't throw an exception for class like declarations
  • KT-79667 Enable resolve on java record components in standalone mode
  • KT-73050 KaFirSymbolRelationProvider#expectsForActual: suspicius logic for KaReceiverParameterSymbol
  • KT-78904 KaBaseWriteActionStartedChecker throws when no additional WA was done
  • KT-79281 Add KDoc to KaTypePointer#restore
  • KT-78597 KaUseSiteVisibilityChecker returns false for internal functions exposed via implicit receiver
  • KT-71705 FIR api impl: Postfix increment expression's expressionType is Unit when incrementing array element
  • KT-75057 Analysis API: Reference to object through typealias in invoke operator call leads to original type

Backend. Native. Debug

  • KT-79848 Flaky debugger tests in opt.debug/cache.*/GC.CMS/GC.sch.ad/alloc.custom configuration

Backend. Wasm

New Features

  • KT-59032 Support instantiation of annotation classes on WASM

Fixes

  • KT-69621 K/Wasm: Consider enabling support for KClass.qualifiedName by default
  • KT-80018 K/Wasm: exceptions don't work properly in JavaScriptCore (vm inside Safari, WebKit)
  • KT-66072 K/Wasm: improve how exceptions work in JS interop
  • KT-80106 devServer in Kotlin/Wasm overwrites defaults, causing missing static paths
  • KT-80210 Wasm: "Unexpected non-external class: kotlin.Nothing" caused by JsExport with JsPromise
  • KT-80555 WASM IC: Can't link symbol on kotlinx.coroutines on fresh master
  • KT-80415 WasmJs Number Elvis Operator Crash
  • KT-76509 WasmJS: ReferenceError: Temporal is not defined caused by "Redundant reference to unused external results"
  • KT-79317 [Wasm] Do not throw CCE for ExcludedFromCodegen declarations
  • KT-78036 K/Wasm: generate a message with "expected" and "actual" types in case of CCE

Compiler

New Features

  • KT-77676 K/N: enable typechecks and the casts optimization pass in debug mode by default
  • KT-80768 Warning on overloading by a superset of context parameters in class context
  • KT-79185 Support for local type aliases
  • KT-80461 K2: false positive NO_ELSE_IN_WHEN for complex sealed hierarchy
  • KT-79380 Native: add performance measurement for the rest of backend phases
  • KT-79381 Native: add performance measurement of LLVM phases
  • KT-80222 Implement the prohibition of always-false is checks for definitely incompatible types
  • KT-79295 Parse and build raw FIR from new short and full forms of positional destructuring with square brackets
  • KT-74810 Support typealiased/mapped Java types in unused return value checker
  • KT-71244 Incorporate existing @CheckReturnValue annotation(s) into Kotlin's unused return value checker
  • KT-79922 Record 'MustUse/ExplicitlyIgnorable' state for overrides even in disabled RVC mode
  • KT-79920 Store 'Explicitly ignorable' state of function/property in the metadata
  • KT-79690 Implement a USELESS_ELVIS_LEFT_IS_NULL with elvis expression
  • KT-79296 Implement/adapt diagnostics for new destructuring
  • KT-79298 Report errors on new destructuring syntax in K1

Performance Improvements

  • KT-81340 K/N: severe compilation time degradation after turning on casts optimization pass
  • KT-80554 Kotlin/Native: investigate performance hit from always-on llvm pass profiling
  • KT-80370 Add NO_INLINE attribute to some of runtime functions
  • KT-80167 K/N: condense the nodes and edges in DevirtualizationAnalysis constraint graph
  • KT-79535 Revert incorrect SAM conversion enhancements brought to K2

Fixes

  • KT-81257 Native: "Unexpected boolean predicate" when generating 'static_cache'
  • KT-80864 K2: Missing Val cannot be reassigned diagnostic for Java final fields (crashes in runtime with IllegalAccessError)
  • KT-75215 KDoc: references from @param tag are rendered as plain text
  • KT-79887 K2 Compiler Internal Error in 'FirFakeOverrideGenerator.checkStatusIsResolved' Method
  • KT-78125 false-negative shadowed contextual overload warning on local declarations
  • KT-79274 Frontend implementation of name-based destructuring
  • KT-81057 Wrong handling of boxing during redundant casts optimization
  • KT-80285 IJ monorepo: broken compilation after 2.2.20-RC update
  • KT-81015 Mark nested typealiases as stable for 2.3
  • KT-81064 Wrong safe call null check handling during redundant casts optimization
  • KT-80744 Kotlin failure on lambda with type parameter
  • KT-78280 Implement the sourceless KtDiagnostics
  • KT-78819 K2: False positive ABSTRACT_MEMBER_NOT_IMPLEMENTED in KJK hierarchy
  • KT-81018 ISE "IR class for Foo not found" on missing dependency when lowering SAM constructor
  • KT-80936 NON_PUBLIC_CALL_FROM_PUBLIC_INLINE : @PublishedApi doesn't work for fun interfaces
  • KT-75748 StackOverflowError when reading array from metadata annotations
  • KT-80400 K2: AbstractMethodError on fun interface implementation inheriting from an interface compiled with -jvm-default=disable
  • KT-80940 K2: Exception in FIR2IR with AnnotationTarget.TYPE with self-annotated non-vararg default argument and usage in child module
  • KT-80538 KaFirDiagnostic.EmptyRange doesn't work in most of the cases
  • KT-80524 Class is not abstract and does not implement abstract member when compiling with kotlinc-jklib
  • KT-80597 Apply fix for CVE-2024-7254 to our fork of protobuf 2.6.1
  • KT-80849 K2: ConstValueProviderImpl doesn't distinguish files with same name and package
  • KT-80602 Exhaustiveness checker improvements for 2.3
  • KT-80735 Support || return/throw shortcut in unsed return value checker
  • KT-79651 Report a warning about an unused return value only on the function name
  • KT-80719 False positive: "Redundant visibility modifier": when overriding protected methods as "public"
  • KT-80711 IC Native: NPE during link on ktor
  • KT-80795 Wong type cast is added for IMPLICIT_COERCION_TO_UNIT
  • KT-80434 K2: DSL marker doesn't work with lambda fields
  • KT-80383 Getter without a body is allowed on a property with an explicit backing field
  • KT-80455 K2: StackOverflowError in when exhaustiveness checker on red code
  • KT-72862 [Native caches] Umbrella for failing codegen/box tests for corner cases in synthetic accessors
  • KT-20278 NO_TYPE_ARGUMENTS_ON_RHS: Confusing diagnostic for inner class of generic outer class
  • KT-80164 Move name generation for unnamed context parameters to frontend
  • KT-78112 RETURN_VALUE_NOT_USED is reported for local function even if it isn't marked with annotation in CHECKER mode
  • KT-48311 Incorrect LINENUMBER after if with a suspend call
  • KT-80688 Bad SourceDebugExtension caused by enhanced coroutines debugging
  • KT-73851 Native: compilation fails with ClassCastException with genericSafeCasts=true
  • KT-77593 Add a warning when @IgnorableReturnValue is inconsistent between expect/actual functions
  • KT-78895 Consider dropping isLocalInFunction and FirClassLikeDeclaration.isLocal
  • KT-79386 Confusing error message when named parameters are used for java method calls
  • KT-80600 K2: Private and final modifiers are allowed on setter of open delegated property
  • KT-79783 KDoc parser: Links aren't rendered if the line has an indent of 4 or more
  • KT-77101 Invoke on callable reference is considered ignorable
  • KT-79923 Remove lookup of @IgnorableReturnValue annotation from FirReturnValueOverrideChecker
  • KT-80517 Synthetic kotlin.Any members in data classes are missing @MustUseReturnValue
  • KT-80194 VAR_TYPE_MISMATCH_ON_OVERRIDE: doesn't mention the inferred type
  • KT-80484 K2: ClassCastException due to fake source for implicit lambda parameter (RedundantNullableChecker)
  • KT-79979 K2: ClassCastException when overriding extension property with delegation
  • KT-80592 UninitializedPropertyAccessException when anayzing annotations on members of anonymous classes
  • KT-80399 Anonymous Kotlin class incorrectly warns about deprecated java override despite '@Deprecated' annotation
  • KT-79610 Adding CocoaPod to Kotlin/Native MPP triggers IR serialization failure and commonizer errors
  • KT-79866 kotlinc 2.2.0 silently emits 'NonExistentClass' instead of reporting an error
  • KT-78664 False positive VARIABLE_NEVER_READ and ASSIGNED_VALUE_IS_NEVER_READ on function type variable with splited declaration and assignment
  • KT-79496 False positive "when must be exhaustive" in triangle interface/class hierarchy
  • KT-79774 KtDestructuringDeclaration.getLPar & getRPar are broken
  • KT-79442 "Multiple annotations of type kotlin.coroutines.jvm.internal.DebugMetadata": 2.2.0-Beta1 generates broken code with JVM default suspend methods in interfaces
  • KT-80391 K2: Only one context parameter is mentioned in the [NO_CONTEXT_ARGUMENT] diagnostic
  • KT-79785 ktypew:kotlin.collections.List already exists error using Swift Export
  • KT-78879 "Sealed types cannot be instantiated": Can't instantiate Java-defined sealed Class from Kotlin
  • KT-80330 K2: NPE at org.jetbrains.kotlin.fir.resolve.calls.FirCallResolver.createResolvedNamedReference
  • KT-21598 Extension is shadowed by member should not be reported when member is deprecated with HIDDEN level
  • KT-79622 FUNCTION_EXPECTED: Misleading 'expression cannot be invoked as a function' when inaccessible with private lambda
  • KT-80255 [EXTENSION_FUNCTION_IN_EXTERNAL_DECLARATION] can be attached to the receiver type of a functional type
  • KT-79816 Java Interfaces implemented by delegation have non-null return checks
  • KT-80177 Improve message of RECEIVER_SHADOWED_BY_CONTEXT_PARAMETER in case of member extension
  • KT-79770 There is no RECEIVER_SHADOWED_BY_CONTEXT_PARAMETER if the usage of fun is from inside the class
  • KT-79430 False positive EXTENSION_SHADOWED_BY_MEMBER on overridden member extension
  • KT-62934 Incorrect line mapping inside inline lambda after non-local return
  • KT-79545 K2: no error on crossinline lambda usage in anonymous object base constructor call
  • KT-79643 HAS_NEXT_FUNCTION_AMBIGUITY and NEXT_AMBIGUITY diagnostics are always ignored in favor of HAS_NEXT_FUNCTION_NONE_APPLICABLE and NEXT_NONE_APPLICABLE
  • KT-79327 Modifier 'private' is not applicable to 'value parameter' is reported for context parameters
  • KT-76453 K2 IDE: autocomplete freeze
  • KT-77182 A function in a file annotated with @file:MustUseReturnValue doesn't produce a warning when it is used from compiled code
  • KT-78541 Jspecify: Unsound platform type despite @NullMarked for an override with a generic-subclass return type
  • KT-79672 'when expression must be exhaustive' even after using 'require()'
  • KT-71306 K2 IDE / Kotlin Debugger: “Cannot find local variable 'block' with type kotlin.jvm.functions.Function0” on evaluating lambda arg inside inline function
  • KT-80003 Kotlin/Native: deprecate eager GlobalData initialization
  • KT-76991 K2 IDE / Kotlin Debugger: ISE “Couldn't find declaration file for” on evaluating local fun when the scope has also inline fun from another file call
  • KT-79877 K2 IDE / Kotlin Debugger: failed evaluations of a code fragment capturing local data class
  • KT-77401 [FIR] ParameterNameTypeAttribute.name doesn't support @ParameterName with compile-time constant property argument
  • KT-79682 Fix partially uninitialized locals after coroutine spills insertion
  • KT-79276 Dexing fails with "Cannot read field X because is null" with 2.2.0
  • KT-79562 NPE when passing non-lambda argument of nullable non-suspend function type into function that accepts nullable suspend function type
  • KT-79693 NotImplementedError: An operation is not implemented: Unknown file with KMP separate compilation
  • KT-79662 Unused return value checker doesn't work for com.google.errorprone.annotations.CheckReturnValue
  • KT-79781 Missing MISSING_DEPENDENCY_CLASS when using type alias with inaccessible RHS
  • KT-79547 "UnsupportedOperationException: Not supported" with inlining and value classes
  • KT-77772 Only report exposed type on qualifier if it's resolved to an object
  • KT-79765 K2. Do not report ignore return value for unresolved reference
  • KT-76343 Drop language version 1.8
  • KT-79017 False negative REDECLARATION on private nested class
  • KT-72039 StackOverflowError on calling keySet on a Kotlin subclass of Java subclass of ConcurrentHashMap
  • KT-79451 Rework approach to recursive types approximation
  • KT-75843 K2: incorrect line numbers in an if-expression with a super-call
  • KT-77504 Add a warning when @IgnorableReturnValue is inconsistent on overrides
  • KT-78389 Perform version 2.3 boostrapping
  • KT-79092 Crash on default argument in function in fun interface
  • KT-77729 Package-level @NullMarked does not work when kotlinc sees .java source files
  • KT-79013 False negative NOT_YET_SUPPORTED_IN_INLINE on inline local functions inside inline functions
  • KT-79139 False positive CONFLICTING_OVERLOADS for context parameters instead of receivers
  • KT-35305 Address the overload conflict resolution between unsigned and non-primitive types
  • KT-42096 No diagnostic reported on inline modifier on an enum entry
  • KT-79355 Failed to fix the problem of desugared inc with new reverse implies returns contract
  • KT-79277 Implies returns contract doesn't affect the return type of the function if it is in the argument position
  • KT-79271 Implies returns contract doesn't impact exhaustiveness
  • KT-79218 SMARTCAST_IMPOSSIBLE for top‑level extension‑property getter despite returnsNotNull contract
  • KT-79220 returnsNotNull contract ignored on extension function with nullable receiver
  • KT-79354 IllegalStateException: Debug metadata version mismatch. Expected: 1, got 2 with compiler 2.2.20-Beta1 and stdlib 2.2.0
  • KT-77986 K2: False negative: "Local classes are not yet supported in inline functions"
  • KT-79456 Redeclaration conflict checks of private top-level classifiers rely on an incorrect containing file
  • KT-79125 RVC full mode: delegated interfaces are not checked
  • KT-63720 Coroutine debugger: do not optimise out local variables
  • KT-78595 type variable leak on a generic property as a call argument given an unstable smart cast
  • KT-79076 'IllegalStateException: Cannot serialize error type: ERROR CLASS: Uninferred type' with Exposed column using recursive generic type
  • KT-75797 Native: find a way to handle generates C bridges in inline functions
  • KT-59807 K2: Replicate the MUST_BE_LATEINIT logic from K1
  • KT-76782 K2: Incorrect resolve into unrelated invoke operator with wrong diagnostic
  • KT-78066 TYPE_PARAMETER_OF_PROPERTY_NOT_USED_IN_RECEIVER error message does not account for context parameters
  • KT-76136 Switch latest stable version in Kotlin project to 2.3
  • KT-78881 K2: False positive "Assigned value is never read" in composable function
  • KT-76065 Drop JavaTypeParameterDefaultRepresentationWithDNN feature
  • KT-77808 Inference: recheck the code about DNN-related hacks
  • KT-24202 NOTHING_TO_OVERRIDE if super-class reference misses generic arguments
  • KT-78909 K2: Missing diagnostics [CYCLIC_INHERITANCE_HIERARCHY] for recursive class inheritance leads to StackOverflowError
  • KT-75969 java.lang.IllegalArgumentException: source must not be null on red code
  • KT-76902 Omit type-use annotations from diagnostics
  • KT-58988 K2: Deprecate exposing package-private parameter of internal method
  • KT-17460 Diagnostics and intention on suspend function that is overriden with non-suspend one.
  • KT-56665 K2: false positive RECURSIVE_TYPEALIAS_EXPANSION
  • KT-78932 Contracts are allowed for open and overridden property accessors
  • KT-77203 FIR: Consider adding destructured type to all COMPONENT_FUNCTION_* diagnostics
  • KT-76635 Implement Data-Flow Based Exhaustiveness Support
  • KT-77685 "IllegalArgumentException: Sequence contains more than one matching element"
  • KT-78452 Drop redundant frontend structures after fir2ir conversion

Compose compiler

New features

  • 98d3907 Introduce a compose group analysis module that produces a proguard/R8 mapping from group keys in bytecode.

Fixes

  • b/431025881 [Compose] Clean up runtime version checker
  • b/365922168 Add java.util.Locale to the list of known stable classes
  • b/407549020 Introduce a registry of known stable markers
  • b/417989445 Added a diagnostic to restrict usages of runCatching in @Composable functions
  • KT-80294 Fix crash with inline @Composable function reference
  • b/430140896 Fix IrSourcePrinter output for when branch check and typechecks

IDE. Gradle Integration

  • KT-46273 MPP: Don't fail import for case of missed platform in source set structure
  • KT-46417 [UNRESOLVED_REFERENCE] For project to project dependencies of native platform test source sets
  • KT-44845 After update to Kotlin 1.4.30 all external dependencies is unresolved in IDE with kotlin.mpp.enableGranularSourceSetsMetadata=true
  • KT-46142 K/N distribution is unavailable from IDE with multiplatform hierarchical project structure enabled

IR. Actualizer

  • KT-80002 Investigate the need for map copying in IrCommonToPlatformDependencyExtractor.kt
  • KT-80131 KMP Separate Compilation: No override for FUN IR_EXTERNAL_DECLARATION_STUB name:
  • KT-80064 KMP Separate Compilation: ClassCastException: class org.jetbrains.kotlin.ir.symbols.impl.IrTypeAliasSymbolImpl cannot be cast to class org.jetbrains.kotlin.ir.symbols.IrClassSymbol
  • KT-80051 KMP Separate Compilation: Actualization of common dependencies failed on 'PROPERTY FAKE_OVERRIDE name:modCount visibility:protected modality:FINAL [fake_override,var]'
  • KT-79998 KMP Separate Compilation: java.lang.IllegalStateException: No override for FUN IR_EXTERNAL_DECLARATION_STUB name:
  • KT-77337 IrNoExpectSymbolsHandler finds expect class reference after enabling annotation traversal in IR

IR. Inlining

New Features

  • KT-70360 KLIBs: Uniformly handletypeOf() calls at 1st/2nd stages of compilation

Performance Improvements

  • KT-69497 Crossinline lambda is allocated on K/N & JS

Fixes

  • KT-79334 Unify intrinsics used on 1st phase of IR inliner in KLIB-based compilers
  • KT-80610 KLIB inliner: Always apply cross-module inlining to pre-processed inline functions
  • KT-80565 KLIB Inliner: Add a special annotation to prohibit inlining of marked inline functions in stdlib on 1st compilation phase
  • KT-80883 [Inliner] Run pre-serialization lowerings in all testrunners
  • KT-77876 IrVisibilityChecker: Different set of exceptions for 1st and 2nd compilation stages
  • KT-80693 [IC] Split IC invalidation tests for cross-module IR Inliner
  • KT-79718 KLIB inliner: Emit warning on generation of public synthetic accessor when running in "explicit API mode"
  • KT-78537 [Inliner] Incorrect KFunction.name of a reference to inlined local function
  • KT-80226 [IR Inliner] Generate constructor accessors as constructors, not static functions
  • KT-80653 [IR Inliner] Space: "Local declarations should've been popped out by this point"
  • KT-80692 [IC] Split IC invalidation tests for intra-module IR Inliner
  • KT-77103 [Inliner] IrLocalDelegatedProperty was not serialized, while its symbol and IrRichPropertyReference were.
  • KT-78392 CommonPrefix: Add a way of stopping execution when one of the phases is unsuccessful
  • KT-78903 Unify codegen/boxInline tests with codegen/box
  • KT-78989 Add missing PL tests for inline functions/property accessors
  • KT-79771 kotlinx-coroutines-core: Public synthetic accessor generated with enabled KLIB IR inliner
  • KT-79680 IrConstructorSymbolImpl is unbound in lambdaWithoutNonLocalControlflow.kt
  • KT-70849 Ensure correct debug info for intra-module IR inlining on the first compilation phase
  • KT-79800 JS BE errors with default values when IR inliner is enabled
  • KT-79352 Remove excessive validations from ValidateAfterAll... on the first stage
  • KT-76599 Migrate IrValidationAfterInliningAllFunctionsPhase to the first stage of compilation
  • KT-78245 Synthetic Accessors incorrectly copies default values
  • KT-72594 [JS][Native] Add IrInliningFacade to test runners

IR. Interpreter

  • KT-72881 K2: incorrect empty array as annotation argument when parameter has default value

IR. Tree

Fixes

  • KT-77819 [IR] Fine-tune IrValidator's run after Fir2IR and IR plugins
  • KT-70160 Remove IrDeclaration.parents after Anvil update
  • KT-80454 LocalDeclarationsLowering: Clean-up the dead code
  • KT-80819 Rework IrFileValidator to use Hashmap instead of ClassValue
  • KT-80516 Kotlin-like IR dump: Don't render tailrec as lateinit
  • KT-79439 KLIB stdlib symbols loading: Split the result of merging of IrBuiltins with BuiltinSymbolsBase hierarchy into two parts (for 1st & 2nd phases)
  • KT-79437 KLIB stdlib symbols loading: Drop loading functions from IrBuiltins and migrate usages to SymbolFinder functions and lazy filtering
  • KT-79569 Unexpected error during DFG phase in Native due to PL issue with SAM conversion represented by rich reference
  • KT-79371 Fix handling of broken SAM conversion in PL with enabled Rich References
  • KT-76601 IrValidatorConfig should have all checks disabled by default
  • KT-69662 Deduplicate function createTemporaryVariable
  • KT-79440 KLIB stdlib symbols loading: Drop BuiltinSymbolsBase from plugin API
  • KT-78960 [FO] Limit static fake overrides generation for static functions
  • KT-76813 IR validator: not all symbols/references are visited

JVM. Reflection

  • KT-76521 Reflection: change KType representation to avoid dependency on K1
  • KT-74624 Reflection: KClassifier.createType(...) ignores annotations parameter
  • KT-80203 Reflection: provide a way to use legacy K1-based implementation
  • KT-80236 Reflection: KType.toString for raw types no longer renders "(raw)"
  • KT-79020 Suspend lambdas return type is shown as ??? in reflection
  • KT-79206 Reflection: suspend functional type classifier is null
  • KT-74529 Context parameters support in reflection

JavaScript

New Features

  • KT-79284 Use BigInt64Array for LongArray
  • KT-79394 Add the possibility to write common external declarations between JS and WasmJS targets

Performance Improvements

  • KT-57128 KJS: Use BigInt to represent Long values in ES6 mode

Fixes

  • KT-81424 Kotlin/JS: Cannot Get / in a simple running application
  • KT-80873 KJS: Stdlib requires ES2020-compatible JS engine due to BigInt type literal
  • KT-56281 KJS: Can't export suspend functions
  • KT-72833 KJS: Source maps have incorrect sources paths in per-file
  • KT-79926 Wrong export of interfaces with companions with ES Modules
  • KT-72474 KJS: @JsPlainObject doesn't honour -XXLanguage:+JsAllowInvalidCharsIdentifiersEscaping
  • KT-79644 BigInt enabled for ES 2015 despite being an ES 2020 feature
  • KT-79089 KJS: Could not load reporter / Cannot find module 'mocha' when running jsNode tests
  • KT-52771 KJS: Pair should be exported to JavaScript
  • KT-79704 Unify variance rendering between JS and other backends
  • KT-69297 Deprecate referencing inlineable lambdas in js() calls
  • KT-80168 Allow @JsStatic inside interface companions
  • KT-80086 [k/js] Resolving imported string literals
  • KT-79066 [Kotlin/JS] jsNodeTest fails with SyntaxError when a test file has @file:JsExport and useEsModules() is enabled
  • KT-79359 Kotlin/JS: Suspending function doesn’t return Unit on es2015
  • KT-77385 Investigate partial linkage problems for JS HMPP tests
  • KT-79628 Remove IR nodes from ExportModel
  • KT-79916 K/JS: "Uncaught TypeError" when using 'Xes-long-as-bigint' in compose-html
  • KT-79050 KJS / IC: "Unexpected body of primary constructor for processing irClass"
  • KT-79977 KJS: Long.rotateLeft returns incorrect result when BigInts are enabled
  • KT-70222 Remove legacy JS BE-related CLI flags
  • KT-78831 AbstractFunctionReferencesLowering: fragile fake override generation
  • KT-52230 KSJ IR: Applying identity equality operator to Longs always returns false
  • KT-6675 KotlinJS: toInt() on external Long throws error
  • KT-79184 K/JS: Further intrinsify BigInt-backed Long operations

Klibs

Performance Improvements

  • KT-80861 [Klib] Deduplicate IrFileEntry.name
  • KT-80866 [Klib] Optimize size of IrFileEntry.line_start_offset
  • KT-80438 Uncached KlibMetadataClassDataFinder.findClassData

Fixes

  • KT-80298 K/N: one-stage compilation is broken
  • KT-80099 KLIB resolver: Could not find file because of missing klib extension in resolved symlink path
  • KT-79958 KLIB tool fails to render IR if there is IrErrorType in a lirbrary
  • KT-75241 Move ExperimentalLibraryAbiReader to a publishable artifact
  • KT-76260 Make IrRichCallableReferencesInKlibs lang feature stable in LV=2.3
  • KT-61552 [PL] IndexOutOfBoundsException in SAM conversion with substituted function
  • KT-74417 Deduce the metadata version based on LV in KLIB-based backends
  • KT-75980 [Klib] Reduce serialized size of IrFileEntries for sparse usage of another source files
  • KT-73826 Deduplicate IrFileEntry that is serialized inside IrInlinedFunctionBlock

Language Design

  • KT-76926 Allow return in expression bodies if return type is specified explicitly
  • KT-23610 Overload resolution ambiguity for suspend function argument
  • KT-32619 JS: return Promise when continuation is not provided
  • KT-78866 Warn implicit receiver shadowed by context parameter
  • KT-78976 Decide if K2 should support local functions inside of local inline functions
  • KT-79308 Ability to actualize empty interfaces as Any
  • KT-48872 Provide modern and performant replacement for Enum.values()

Libraries

New Features

  • KT-31400 Add smartcast for isArrayOf
  • KT-78463 Annotate wasm and JS targets of kotlin-stdlib with @IgnorableReturnValue when appropriate
  • KT-74444 EnumEntries type should implement RandomAccess
  • KT-78462 Annotate kotlin-stdlib-jvm with @IgnorableReturnValue where appropriate

Fixes

  • KT-80778 Stabilize kotlin.time.Clock and kotlin.time.Instant
  • KT-80619 [KLIBs] Enable intra-module inliner in stdlib & kotlin-test
  • KT-76773 stdlib: contextOf's type argument can be inferred via contextOf's context argument
  • KT-71822 Intersection with (subtraction from) an identity set may produce incorrect results
  • KT-74411 Introduce Uuid.generateV4() and generateV7()
  • KT-80605 Rename MustUseReturnValue -> MustUseReturnValues
  • KT-56822 Deprecate Number.toChar() with error deprecation level
  • KT-69947 KLIB stdlib: All intrinsics that can be used in KLIBs with inlined IR must be included in stdlib ABI dump
  • KT-59044 Improve various aspects of TimeSource documentation
  • KT-80544 Mark controversial path extensions (like .deleteRecursively()) as ignorable
  • KT-80603 K/N and K/Wasm: \p{N} category is not supported
  • KT-79192 Increase InputStream.readBytes(Int) deprecation level to HIDDEN
  • KT-80661 ArrayDeque.lastIndexOf may return -1 for an element present in the deque
  • KT-80390 ArrayDeque.indexOf(null) wrongly returns 0 after removals
  • KT-79094 Change signature of assertFailsWith or make lambda excluded otherwise
  • KT-72028 Incorrect parameters order in IndexedValue documentation
  • KT-80130 [stdlib] Commonize AssociatedObjects in commonNonJvmMain
  • KT-80107 [stdlib] Move CancellationException to commonNonJvmMain
  • KT-80179 Investigate why StringBuilder.length is not enhanced automatically
  • KT-80046 Increase test coverage of Duration.parse[IsoString][OrNull] methods
  • KT-76459 Remove comments about sorting stability in unsigned-type arrays
  • KT-79489 Generate Stdlib API reference for webMain source set
  • KT-78243 Drop JS- and Wasm-specific IrLinkageError classes
  • KT-79108 Remove the default argument for linkageError from kotlin.js.getPropertyCallableRef
  • KT-79130 K/JS: Remove bodies from intrinsified Long methods
  • KT-79239 K/Wasm: elementAt extension function of Array/PrimitiveArray/UnsignedArray does not throw IndexOutOfBoundException on incorrect index
  • KT-79256 K/Wasm: MatchResult.groups raises a trap on invalid group index
  • KT-57317 Repack EnumEntries from stdlib into the compiler

Native

  • KT-79384 K/N: Application Not Responding: Thread Deadlock
  • KT-80536 Native: DependencyDownloader seems to have no timeout
  • KT-80624 Bump minimal watchOS supported versions to 7.0
  • KT-80620 Bump minimal iOS and tvOS supported versions to 14.0

Native. Build Infrastructure

  • KT-80147 Set proper LV and AV for kotlin-native/performance/buildSrc
  • KT-79474 Kotlin/Native: fix breakpad build
  • KT-79215 Kotlin/Native: fix distInvalidateStaleCaches on windows

Native. C and ObjC Import

  • KT-79571 Xcode 26 beta 4: CInteropKT39120TestGenerated.testForwardEnum failed
  • KT-79753 Native: support CCall.Direct calls in the compiler
  • KT-80838 Cinterop fails with an error when Compilation works fine
  • KT-79752 Native: make cinterop generate CCall.Direct annotations
  • KT-49034 Kotlin/Native: cnames.structs.Foo resolves into wrong declaration

Native. ObjC Export

  • KT-78810 [ObjCExport] Enable explicit ObjC block parameter names by default
  • KT-80271 ObjC/Swift Export: Remove Native platform Cloneable checks
  • KT-78604 Consider not inheriting KlibScope from KaScope
  • KT-79767 ObjCExport: private companion must not be exposed
  • KT-79724 ObjCExport: extensions order
  • KT-79548 ObjCExport: mangling difference between K1 and K2 when translating KotlinDurationCompanion
  • KT-79475 ObjCExport: invalid property getter translation
  • KT-79346 ObjCExport: Any method overrides
  • KT-78871 ObjCExport: translation of keyword release with parameter generates invalid header

Native. Runtime. Memory

  • KT-75918 Native: Deprecate -Xallocator=std
  • KT-80678 Native: pagedAllocator=false sweep is slow
  • KT-75916 Native: Enable sanitizer support with pagedAllocator=false

Native. Swift Export

  • KT-80111 Swift Export Build Fails Due to Errors in KotlinStdlib.swift
  • KT-80884 Swift Export: support async in SIR
  • KT-80185 Swift Export: IllegalArgumentException – Collection contains more than one matching element
  • KT-79889 K/N: swift-export fails under several different conditions
  • KT-79518 Swift export: represent kotlin.Any as swift.any
  • KT-78603 Do not inherit SirAndKaSession from KaSession
  • KT-79227 Swift Export: Fix First Release Issues
  • KT-79521 '_CoroutineScope' is inaccessible due to 'internal' protection level
  • KT-79181 Swift Export Fails When Using T: Comparable Generic Constraint in Kotlin Classes

Tools. Ant

Tools. BCV

  • KT-80313 Add ability to generate dump from jar files [ABI Tools]

Tools. Build Tools API

  • KT-79409 BTA: Support removed compiler arguments properly
  • KT-78196 BTA: implement API adapter for the prototype implementation
  • KT-77999 BTA: Generate BTA options from compiler arguments descriptions
  • KT-78194 BTA: port the JVM prototype to the new design
  • KT-78193 BTA: Implement core infrastructure according to the new design
  • KT-78195 BTA: migrate the test infrastructure from the prototype to the new design

Tools. CLI

  • KT-79867 CompilerConfiguration.configureSourceRoots puts obfuscated file paths instead of ones passed on classpath to CLIConfigurationKeys.CONTENT_ROOTS
  • KT-80348 Expose 'XXLanguage' compiler argument as a normal argument
  • KT-80428 KMP Separate Compilation: Handle friend dependencies
  • KT-74590 Deprecate -Xjvm-default in favor of -jvm-default
  • KT-80349 KMP Separate Compilation is enabled on non-KMP compilations
  • KT-79982 Fix description of -Xjspecify-annotations
  • KT-79403 Improve generator for deprecated CLI arguments
  • KT-75968 Set proper lifecycle for all existing compiler arguments
  • KT-79293 Create Language Features and compiler argument with parameter for new destructuring features

Tools. Commonizer

  • KT-49735 [Commonizer] :commonizeNativeDistribution fails for projects with two or more same native targets
  • KT-47523 MPP: Unable to resolve c-interop dependency if platform is included in an intermediate source set with the only target
  • KT-48118 Commonized c-interop lib is not attached to common main source set
  • KT-46248 MPP: Compile KotlinMetadata fails with Unresolved reference if only one native platform from shared source set is available

Tools. Compiler Plugin API

  • KT-74867 LLFirIdePredicateBasedProvider matches local classes when it shouldn't
  • KT-52665 Deprecate ComponentRegistrar
  • KT-55300 Provide a mechanism to describe ordering and dependencies for compiler plugins
  • KT-75865 Provide an API for setting the file name for the file with top-level declarations generated by a plugin

Tools. Compiler Plugins

  • KT-80815 NoArg compiler plugin: Promote NO_NOARG_CONSTRUCTOR_IN_SUPERCLASS diagnostic from warning to error
  • KT-80822 False positive NO_NOARG_CONSTRUCTOR_IN_SUPERCLASS reported for a class with explicit noargs constructor already present
  • KT-53122 Constructors generated with NoArg have no @Metadata and are invisible for the frontend
  • KT-79319 Lombok: NullPointerException on mvn compile when importing Java constants
  • KT-74687 Kotlin Lombok: False positive when calling builder on Java record
  • KT-80419 Remove bundled jetbrains annotations from kotlin-dataframe-compiler-plugin
  • KT-79245 [AtomicFU] Drop K1/JS- and K1/Native-specific testrunners
  • KT-79197 DataFrame: Cannot find local variable 'this@df' with type Scope0
  • KT-73865 Incorrect type is generated for irPropertyReference during K/N transformation

Tools. Compiler plugins. Serialization

  • KT-70345 Promote COMPANION_OBJECT_IS_SERIALIZABLE_INSIDE_SERIALIZABLE_CLASS diagnostic to error
  • KT-79695 Serialization does not exclude field-less properties in 2.2.20-Beta2
  • KT-79246 [Serialization] Drop K1-specific testrunners

Tools. Gradle

Fixes

  • KT-80763 Add redirect link to error message when 'org.jetbrains.kotlin.android' plugin is used with built-in Kotlin
  • KT-81038 Gradle: remove support for properties disabling precise task outputs backup
  • KT-75449 Update deprecation of KotlinJsTestFramework#createTestExecutionSpec
  • KT-80875 Gradle: runToolInSeparateProcess may fail on Windows with too long command line
  • KT-79851 Emit an actionable warning/error on unsupported AV/LV configured by kotlin-dsl
  • KT-64273 Gradle: remove symbols deprecated after KT-54312
  • KT-77458 Run Gradle integration tests against Gradle 9.0
  • KT-74915 Make ExtrasProperty.kt internal
  • KT-64992 Remove KotlinCompilation.source
  • KT-76720 Raise deprecation level to error for Kotlin*Options properties
  • KT-80172 Error message changes depending on the order of applying 'org.jetbrains.kotlin.android' and 'AGP' 9.0+ with built-in Kotlin plugin
  • KT-76177 Remove deprecated classpath snapshot task inputs
  • KT-79238 Bump minimal supported AGP version to 8.2.2
  • KT-79339 Remove additionalMetadata from compiler options DSL
  • KT-78741 Add FUS analytics for klib cross-compilation
  • KT-73478 Add module level description
  • KT-80083 KGP IT: fix tests on Windows
  • KT-79034 Automatically disable cross compilation if it's not supported on the host
  • KT-79408 A lot of errors files are created when compile Kotlin
  • KT-78827 Rewrite Gradle compiler options DSL generator

Tools. Gradle. BCV

  • KT-80621 Move Gradle tasks into suitable groups [ABI Validation]
  • KT-78625 Kotlin's built-in BCV generates empty .api files

Tools. Gradle. JS

  • KT-79910 Wasm, JS: Upgrade NPM versions
  • KT-79921 Web Tooling Gradle API does not respect webpack reconfiguration
  • KT-76996 Wasm: js tasks triggers wasm subtasks
  • KT-79237 Upgrade NPM dependencies versions

Tools. Gradle. Multiplatform

New Features

  • KT-76446 Add kotlin-level dependency block to work the same way as commonMain/commonTest dependencies blocks

Fixes

  • KT-80785 With android.builtInKotlin=false and android.newDsl=true, using kotlin-android plugin will fail with ClassCastException
  • KT-61127 Remove scoped resolvable and intransitive DependenciesMetadata configurations used in the pre-IdeMultiplatformImport IDE import
  • KT-62614 Remove legacy kotlin-gradle-plugin-model
  • KT-79559 AGP complains about configurations resolved at configuration time due to KMP partially resolved dependencies diagnostic
  • KT-78993 The value for property '*' property 'dependencies' is final and cannot be changed any further
  • KT-74005 Implement a prototype of Unified Klib support in Kotlin Gradle Plugin
  • KT-76200 TestModuleProperties.productionModuleName for JVM module isn't present with 2.1.20-RC
  • KT-55312 Replace "ALL_COMPILE_DEPENDENCIES_METADATA" configuration with set of metadata dependencies configurations associated per set
  • KT-52216 HMPP / KTOR: False positive "TYPE_MISMATCH" with Throwable descendant
  • KT-54312 TCS: Replace CompilationDetails abstract class hierarchy by composable implementation
  • KT-55230 Remove metadata dependencies transformation for runtimeOnly scope

Tools. Gradle. Native

  • KT-80675 Commonized cinterops between "test" compilations produce an import failure
  • KT-64107 Kotlin Gradle plugin allows native binaries to have both debuggable and optimized flags set to true
  • KT-74910 Bump destinationDir in CInteropProcess to hidden
  • KT-74911 Promote CInteropProcess.konanVersion to hidden
  • KT-74864 Enable exporting KDocs by default to ObjC
  • KT-72705 K/N: compile task cache can not be used due to 'artifactVersion' input property

Tools. Gradle. Swift Export

  • KT-79524 NoSuchMethodError: 'java.lang.String org.gradle.api.artifacts.ProjectDependency.getPath() for swift export with dependency export fro gradle < 8.11

Tools. Incremental Compile

  • KT-75864 Implement a conservative mechanism of the IC with compiler plugins generated top-level declarations
  • KT-79504 Implement an API to provide IC lookups from backend plugins
  • KT-55982 K2: Consider global lookups from plugins in incremental compilation
  • KT-75657 Fix difference in incremental compilation scenarios in BTA in-process vs daemon compilation mode
  • KT-79541 Refactor tracking of files relation in IC
  • KT-74628 Incremental compilation runner does not check compiler exit code before mapping sources to classes

Tools. JPS

  • KT-77347 Support file-less compatible IC approach

Tools. Kapt

  • KT-73411 Remove kapt.use.k2 property and code which allows to use K2 with K1 kapt
  • KT-79138 K2: KAPT Java Stub Gen: Unresolved reference with @kotlin.Metadata in Java in 2.2.0
  • KT-79641 Kapt: too much information is printed in verbose mode
  • KT-79305 K2 kapt: ISE "Cannot evaluate IR expression in annotation" on typealias with unresolved expansion
  • KT-79136 K2 kapt: unresolved nested class references in annotation arguments are generated without outer class names
  • KT-79133 K2 kapt: class literal with typealias is not expanded

Tools. Performance benchmarks

  • KT-79709 Add -Xdetailed-perf CLI flag to control verbosity of performance logs
  • KT-79226 [K/N] Add performance measurement for native backend lowerings

Tools. Statistics (FUS)

  • KT-77407 Add performance measurement for prefix lowerings
  • KT-79455 [FUS] Collect KSP plugin version
  • KT-79090 Integrate dynamic stats into MarkdownReportRenderer

Tools. Wasm

  • KT-80582 Multiple reloads when using webpack dev server after 2.2.20-Beta2
  • KT-80896 K/Wasm: debug tests only once
  • KT-78921 K/Wasm: don't generate empty yarn.lock file

Don't miss a new kotlin release

NewReleases is sending notifications on new releases.