Skip to content

Releases: JetBrains/kotlin

Kotlin 2.4.10-RC

Kotlin 2.4.10-RC Pre-release
Pre-release

Choose a tag to compare

@KotlinBuild KotlinBuild released this 25 Jun 09:46

Changelog

Compiler

  • KT-86939 JVM: IllegalStateException "No value for annotation parameter" when using const val in nested Java annotation array argument
  • KT-83766 K2: Wrong sourcePsi is set for SymbolPsiLiteral in SLC for annotation arguments referencing a const val
  • KT-86728 Reified type inference: expected type not propagated into inline call inside lambda with elvis operator

Compose compiler

  • b/522127447 Fixed a bug that was making the stability of pre-cast types be used in certain skipping checks instead of the stability of post-cast types

Klibs

  • KT-86501 Native: IrTypeAliasSymbolImpl is already bound. Signature: kotlinx.datetime/Instant|null[0] on iosSimulatorArm64

Tools. CLI

  • KT-86930 Introduce kotlinr in the Kotlin distribution

Tools. Gradle. JS

  • KT-86057 kotlinUpgradeYarnLock skips lock file regeneration when kotlinNpmInstall is up-to-date, causing kotlinStoreYarnLock to fail

Tools. Gradle. Multiplatform

  • KT-87084 False positive warning for JS and Wasm compilations when CRI is enabled

Tools. Scripts

  • KT-87076 @file:CompilerOptions("-jvm-target", ...) ignored in .main.kts scripts in Kotlin 2.4.0, falling back to JVM target 1.8
  • KT-86352 K2 scripting: FirResolvedTypeRef exception when resolving extension functions from imported scripts

Kotlin 2.4.20-Beta1

Kotlin 2.4.20-Beta1 Pre-release
Pre-release

Choose a tag to compare

@KotlinBuild KotlinBuild released this 24 Jun 13:16

Changelog

Analysis API

  • KT-85418 Implement an API for accessing deserialized file annotations in Analysis API
  • KT-74448 K2. False positive MISSING_DEPENDENCY_SUPERCLASS in LinkedListTest.kt, kotlinx.coroutines
  • KT-85856 containingSymbol of constructor property differs for local and non-local classes

Analysis API. Code Compilation

  • KT-76457 K2 IDE / KMP Debugger: KISEWA “Cannot compile a common source without a JVM counterpart” on evaluating inline fun from common module inside jvm

Analysis API. FIR

  • KT-70552 No expects for actual
  • KT-86014 Types are broken after remove parameter through change signature
  • KT-86363 KotlinIllegalArgumentExceptionWithAttachments: No dangling modifier found on companion blocks
  • KT-86147 Drop kotlin.parallel.resolve.under.global.lock registry key
  • KT-85543 Avoid lazy resolve for the contracts phase if no constracts might be resolved

Analysis API. Infrastructure

  • KT-86186 Analysis API: Codebase tests run twice in some analysis modules — pick a single JUnit runner and migrate
  • KT-85360 Drop kotlin-compiler-testdata-for-ide artifact
  • KT-85585 Simplify the dependencies graph for the Analysis API modules
  • KT-85381 Remove tests for the FE10 implementation

Analysis API. Light Classes

New Features

  • KT-84645 Support resolving to companion block members & extensions from Java (light classes)
  • KT-80775 Support PsiClass#getRecordComponents in light classes

Fixes

  • KT-57537 SLC: propagate default parameter value from (@JvmOverloads) expect declarations to actual declarations
  • KT-63568 Symbol Light Classes: KtAnnotationApplicationWithArgumentsInfo.normalizedArguments() may work incorrectly when psi is not set
  • KT-70428 AA: good code is red when a Java class extends a Kotlin class implementing MutableList by delegation
  • KT-36740 MPP: False-positive incompatible types in .java when using expect-class returned by non-expect member from common when actual is actual typealias
  • KT-67749 Analysis API: Symbol Light classes should be available only to pure JVM sources
  • KT-85040 [Analysis API] Improve Java / Kotlin interop in KMP projects
  • KT-68169 K2 IDE. KMP. False positive type mismatch in java file of jvm source-set when using common declaration which expects String
  • KT-37783 KMP Java Interop: JVM-only methods on actual superclass not resolved in Java for common subclass
  • KT-40059 Provide type correction for expect/actual types used from Java-code
  • KT-71429 MPP: False positive "Function1 is not a functional interface" when calling code from Common in Java
  • KT-70426 SLC: kotlin.Collection#size is not exposed by default
  • KT-60480 Symbol Light Classes: Classes implementing kotlin.collections.* interfaces don't implement all methods from the corresponding java.util.* interfaces
  • KT-36991 IDE: "both methods have same erasure" for Java classes directly or indirectly extending Kotlin collections
  • KT-22594 KotlinCollection.getSize is not highlighted as an error in Java

Analysis API. PSI

  • KT-85052 Move mutation methods out of the Kotlin PSI
  • KT-84925 Move KtReference to the Kotlin IntelliJ plugin
  • KT-85427 Use factory-like pattern instead of reflection in KtNodeType
  • KT-84789 Ensure all KtClassBody.parent usages are correct
  • KT-85154 PSI: "AE: parent is ERROR_ELEMENT" with top-level destructuring declaration

Analysis API. Providers and Caches

  • KT-82220 Analysis API: Support platform-specific session components and checkers in metadata sessions
  • KT-82731 Analysis API: Limit granular tree change processing to a few files

Analysis API. Standalone

  • KT-85112 AA does not see packages from unpacked klibs
  • KT-86417 Support parameters in 'getExpectsForActual()'
  • KT-84916 Metadata stub deserializers aren't properly set up for Analysis API Standalone
  • KT-83191 Analysis API: JvmDependenciesIndexImpl performs very poorly for large classpaths

Analysis API. Stubs and Decompilation

  • KT-86520 KotlinDeclarationInCompiledFileSearcher doesn't support visibility-mangled declarations
  • KT-64901 Inconsistency between AST and Stub tree in the case of non-local destructuring declarations
  • KT-84444 Support stubs for companion blocks & extensions

Analysis API. Surface

New Features

  • KT-73214 Add KaScope#declarations with name filter
  • KT-69085 Provide API to retrieve label/name from KtFunctionLikeSymbol
  • KT-70771 KaLocalVariableSymbol: support isDelegatedProperty
  • KT-85239 Streaming version of collectDiagnostics()
  • KT-85037 Add API for KaFunctionType's returnType modification
  • KT-80460 AA: Introduce KtExpression.isStableForSmartCasting API
  • KT-82519 Automatically recognize the appropriate analysis mode for in-memory file copies based on their content
  • KT-65912 Analysis API: Implement type building API for all KtType

Fixes

  • KT-66039 K2: Analysis API: redesign resolution API
  • KT-70794 K2 IDE: Reference to object does not resolve as LHS in "plusAssign" assignment expression
  • KT-70774 Unary operators on literals are not resolvable
  • KT-86757 Flaky annotations result for @all annotation on a backing field
  • KT-85382 Remove the FE10 implementation
  • KT-86681 [Analysis API] Move isDelegated to KaVariableSymbol
  • KT-86685 collectCallCandidates works incorrectly for a constructor vs. a companion invoke
  • KT-86514 No expected type within collection literal in annotation entry using array rather than varargs
  • KT-76076 K2 AA: safe call expression navigates to parent array index access expression
  • KT-86418 Support property accessors in 'getExpectsForActual()'
  • KT-71312 KaFirPsiJavaClassSymbol.{hasAnnotations, annotationSimpleNames} is inconsistent with FirJavaClass implementation
  • KT-86394 Resolve from KDoc reference is inconsistent with source code
  • KT-86248 isUsedAsExpression true for typealias lhs in ::
  • KT-85778 Analysis API: Ensure that all public endpoints in implementation modules are internal or opt-in
  • KT-78285 resolveToCallCandidates inconsistent behaviour with invoke operator and constructor
  • KT-85852 CCE in buildClassType
  • KT-85989 Super type references should be aware of type alias constructors
  • KT-84184 [Analysis API] Provide a unification substitutor API
  • KT-84584 Support companion extensions and blocks in the Analysis API
  • [KT-84932](https://yo...
Read more

Kotlin 2.4.0

Choose a tag to compare

@KotlinBuild KotlinBuild released this 03 Jun 09:31

Changelog

Analysis API

  • KT-83867 OVERLOAD_RESOLUTION_AMBIGUITY false positive with assertEquals in IJ repo
  • KT-83723 [Analysis API] Enable experimental KDoc resolver by default
  • KT-83388 Analysis API: properly support KMP in KotlinPackageProvider
  • KT-65683 Analysis API: Dangling file session creation causes a computeIfAbsent contract violation

Analysis API. Code Compilation

  • KT-78946 Evaluation of variable with local class in type parameter leads to InventNamesForLocalClasses exception

Analysis API. FIR

  • KT-68260 K2 AA: InvalidFirElementTypeException “For CALLABLE_REFERENCE_EXPRESSION with text ::lam1, unexpected element of type: no element found” with illegal callable reference call
  • KT-70896 AA: False positive deprecation warning with override of built-in method in JDK mapped class
  • KT-84711 K2 IDE sometimes loses FIR plugin-generated declarations after file changes
  • KT-84625 Analysis API: collectDesignationPath fails for nested classes inside plugin-generated top-level classes
  • KT-84596 Improve K2 Jooq completion performance
  • KT-84525 KaValueParameterSymbol#getHasSynthesizedName returns false for FirDeclarationOrigin.SubstitutionOverride.DeclarationSite
  • KT-83546 Kotlin analysis reach ClsCustomNavigationPolicy
  • KT-84259 Move CommonDefaultImportsProvider to the frontend independent module
  • KT-82945 Analysis API: KotlinIllegalArgumentExceptionWithAttachments: Expected FirResolvedTypeRef with ConeKotlinType but was FirUserTypeRefImpl
  • KT-71135 AA: exception from sealed inheritors checker when analyzeCopy

Analysis API. Infrastructure

Fixes

  • KT-83905 Analysis API: Improve UX with test data
  • KT-84913 Extract compiler classes used by the PSI & Analysis API to a separate module
  • KT-64986 Analysis API: Implement Analysis API tests for different KMP Platforms
  • KT-84776 The test data manager misses the redundancy check in the update mode
  • KT-84962 The test data manager misses -ea flag
  • KT-84388 Preserve the EOF status in the test data manager to avoid extra changes
  • KT-84362 Analysis API tests produce many warnings due to "not yet loaded registry"
  • KT-84279 Test Data Manager fails on a clean build
  • KT-83913 Exclude compiler-based Analysis API tests from Git tracking
  • KT-80379 Extract per-module test generators for AA tests
  • KT-84120 Move CLI modules out of kotlin-compiler-fe10-for-ide
  • KT-83200 Track external dependencies of the Analysis API modules

Analysis API. Light Classes

  • KT-82434 Light classes should prefer enum entries to properties
  • KT-84200 SLC: return type is not boxed for delegated methods with generic original method
  • KT-72451 "CCE: class PsiPrimitiveType cannot be cast to class PsiClassType" with same-named enum class and typealias

Analysis API. PSI

  • KT-84715 removeModifier doesn't delete whitespaces around the removed modifier
  • KT-84564 KtEnumEntry.delete deletes semicolon
  • KT-84781 Use computed properties in KotlinElementTypeProviderImpl
  • KT-83846 Set up guidelines for PSI
  • KT-84135 Deprecate KtSelfType

Analysis API. Providers and Caches

  • KT-82731 Analysis API: Limit granular tree change processing to a few files
  • KT-79234 Analysis API: Usage of asMap() on Caffeine caches bypasses stats counters
  • KT-74090 Analysis API: Support dumb mode (restricted analysis)

Analysis API. Standalone

  • KT-83801 Nested typealiases are not correctly indexed in standalone mode

Analysis API. Stubs and Decompilation

  • KT-85371 StackOverflowError from LLKotlinStubBasedLibrarySymbolProvider and StubBasedClassDeserialization
  • KT-83935 Support KDoc loading in decompiled stubs

Analysis API. Surface

New Features

  • KT-85239 Streaming version of collectDiagnostics()
  • KT-82519 Automatically recognize the appropriate analysis mode for in-memory file copies based on their content
  • KT-73534 SAM method API
  • KT-82993 Support explicit backing fields in the Analysis API

Fixes

  • KT-79186 KtCompletionExtensionCandidateChecker does not work for extensions when using callable references of a type
  • KT-83759 Analysis API: Mark platform interface APIs with @KaPlatformInterface
  • KT-83921 Extend KaKDocProvider to read Kdoc from KLIB metadata
  • KT-77426 KaFirCompilerFacility uses an arbitrary JVM counterpart for common sources
  • KT-84737 KaCallableSymbol#directlyOverriddenSymbols doesn't work for java overrides of kotlin properties
  • KT-84621 Migrate symbol tests to ManagedTest properly
  • KT-80575 KaFirJavaInteroperabilityComponent#getJavaGetterName should not throw exception on incomplete code
  • KT-84397 KtDefaultAnnotationArgumentReference should return only results with value name
  • KT-84804 buildSubstitutor does not work correctly with Java type parameters
  • KT-84389 Cover references with ABI and documentation checks
  • KT-57042 K2, Analysis API: KaJavaInteroperabilityComponent#callableSymbol returns null for a Java getter implementing Kotlin property
  • KT-80856 Analysis API: analysisContextModule incorrectly determines the module of an original file when used for dangling file context assignment
  • KT-84363 AA, isUsedAsExpression: Unhandled Non-KtExpression parent of KtExpression: class org.jetbrains.kotlin.psi.KtContractEffect
  • KT-70476 Analysis API: "KtDefaultAnnotationArgumentReference.resolveToSymbols" does not work in FIR implementation
  • KT-68499 Split KtDefaultAnnotationArgumentReference on K1 and K2 implementation
  • KT-70521 Analysis API: Impossible to distinguish between 'iterator' operator calls dispatched with imports from objects
  • KT-77669 Context arguments are missed on implicit invoke calls
  • KT-77670 resolveToCall: extensionReceiver is incorrectly chosed due to a conflict with context parameters for an implicit invoke call
  • KT-68633 K2 AA: IAE "Expected class KaClassSymbol instead of class KaFirEnumEntrySymbol" with enum entry initializer
  • KT-83777 Analysis API: The resolution scope of a context module accepts elements from associated dangling files
  • KT-82571 No expected type for overridden property without explicit type
  • KT-83223 Support "Explicit context arguments" in the Analysis API
  • KT-65186 K2: Analysis API: KtExpressionTypeProvider.getExpectedType works incorrectly for the right hand side of assignment expressions
  • KT-76011 KaFirNamedClassSymbol#companionObject doesn't provide generated objects generated by compiled plu...
Read more

Kotlin 2.4.0-RC2

Kotlin 2.4.0-RC2 Pre-release
Pre-release

Choose a tag to compare

@KotlinBuild KotlinBuild released this 27 May 12:43

Changelog

Backend. J2KLIB

  • KT-86367 [JKLIB] kotlin.Cloneable built-in class not found

Compose compiler

  • b/511102714 Made the default stability of non-final classes Unknown
    instead of Stable

Tools. Build Tools API

  • KT-86395 [BTA] forward-compatibility violation: NoSuchMethodError on JvmSnapshotBasedIncrementalCompilationConfiguration. breaks IC

Tools. Gradle

  • KT-86346 Compiler warnings printed twice in console — once as w: and again as Gradle "Problem found:" block

Tools. Gradle. BCV

  • KT-86268 ABI validation tasks fail with Unsupported platform toolchain type when using kotlin.compilerVersion pointing to an older compiler after BTA migration in 2.4.0-Beta2

Tools. Gradle. Wasm

  • KT-86457 [Wasm, Gradle] BinaryenExec.standardOutput is silently ignored after migration to Gradle Workers

Kotlin 2.4.0-RC

Kotlin 2.4.0-RC Pre-release
Pre-release

Choose a tag to compare

@KotlinBuild KotlinBuild released this 13 May 12:30

Changelog

Backend. J2KLIB

  • KT-84877 [J2KLIB] Remove withKotlinBuiltinsHack present in JKlibIrLinker.kt
  • KT-85846 Tests failing with fake override property missing accessors or backing field
  • KT-85717 IllegalStateException due to already bound symbol
  • KT-86204 [JKlib] Propagate private members from dependecies in the IR tree

Compiler

  • KT-86210 Update -Xannotation-default-target CLI parameter doc
  • KT-85948 Contracts in 2.4 stdlib is not compatible with 2.3 compiler
  • KT-85957 Contract on function is getting discarded if any of effect declarations is unknown
  • KT-86130 False positive UNINITIALIZED_ENUM_COMPANION on LV 2.3 and lower
  • KT-84860 False positive UNINITIALIZED_ENUM_COMPANION in enum access with explicit receiver in enum initializer when enum class has a companion
  • KT-84319 Add JVM target bytecode version 26
  • KT-85825 Context parameter lambda loses context type when wrapped in nested run blocks
  • KT-84960 Property contract leaks unsubstituted type parameter in smart cast

Compose compiler

  • b/509945632 Do not generate groups in inline lambdas without @Composable calls

IR. Interpreter

  • KT-86083 Create a new CLI flag to enable IntrinsicConstEvaluation feature

JVM. Reflection

  • KT-86017 KClass.constructors returns all java.lang.String constructors for mapped type kotlin.String
  • KT-85999 Reflection: ByteArray KType incorrectly has type arguments in Kotlin 2.4.0

Libraries

  • KT-86027 Hide returnsResultOf under a separate flag and remove its usages from kotlin stdlib

Native

  • KT-84733 LLVM Update: rebase LLVM once the upstream stabilizes

Tools. Compiler Plugin API

  • KT-85969 KtLint incompatible with Kotlin 2.4.0-Beta2 (parsing errors / Extensions storage issue)

Tools. Compiler Plugins

  • KT-86170 PowerAssert: Stabilize runtime ABI for initial release
  • KT-85250 PowerAssert: Automatically add runtime library dependency

Tools. Compiler plugins. Serialization

  • KT-85554 Serialization: "IndexOutOfBoundsException" on property generated by Compose plugin
  • KT-85963 IncompatibleClassChangeError: Expected non-static field $stable on deserialization of @Serializable data class when Compose compiler plugin is applied before Serialization plugin

Tools. Gradle

  • KT-85373 Compile against Gradle API 9.5.0
  • KT-85374 Run tests against Gradle 9.5.0

Tools. Gradle. Multiplatform

  • KT-85877 The number of SPM direct dependencies is multiplied on number on targets
  • KT-85706 SwiftPM Import: Updating package version in build script updates version in the lock file
  • KT-83370 Incorrect metadata transformation for stdlib's webMain source set

Tools. Gradle. Native

  • KT-85984 linkReleaseFrameworkIosSimulatorArm64 is executed during Debug iOS build since 2.4.0-Beta2
  • KT-86024 Empty main compilations cause w: [COMPILER_ARGUMENTS_WARNING] There are libraries in -friend-modules CLI argument that are not included in -library CLI argument:

Tools. Gradle. Wasm

  • KT-85974 K/Wasm: Do not set -Xir-per-module for Wasm tasks

Kotlin 2.4.0-Beta2

Kotlin 2.4.0-Beta2 Pre-release
Pre-release

Choose a tag to compare

@KotlinBuild KotlinBuild released this 22 Apr 09:52

Changelog

Analysis API

  • KT-65683 Analysis API: Dangling file session creation causes a computeIfAbsent contract violation

Analysis API. FIR

  • KT-70896 AA: False positive deprecation warning with override of built-in method in JDK mapped class
  • KT-84625 Analysis API: collectDesignationPath fails for nested classes inside plugin-generated top-level classes

Analysis API. Infrastructure

  • KT-84913 Extract compiler classes used by the PSI & Analysis API to a separate module
  • KT-64986 Analysis API: Implement Analysis API tests for different KMP Platforms
  • KT-80379 Extract per-module test generators for AA tests

Analysis API. PSI

  • KT-84715 removeModifier doesn't delete whitespaces around the removed modifier
  • KT-84564 KtEnumEntry.delete deletes semicolon
  • KT-84781 Use computed properties in KotlinElementTypeProviderImpl

Analysis API. Stubs and Decompilation

  • KT-85371 StackOverflowError from LLKotlinStubBasedLibrarySymbolProvider and StubBasedClassDeserialization
  • KT-83935 Support KDoc loading in decompiled stubs

Analysis API. Surface

  • KT-82519 Automatically recognize the appropriate analysis mode for in-memory file copies based on their content
  • KT-85239 Streaming version of collectDiagnostics()
  • KT-83921 Extend KaKDocProvider to read Kdoc from KLIB metadata
  • KT-77426 KaFirCompilerFacility uses an arbitrary JVM counterpart for common sources
  • KT-84737 KaCallableSymbol#directlyOverriddenSymbols doesn't work for java overrides of kotlin properties
  • KT-84621 Migrate symbol tests to ManagedTest properly
  • KT-80575 KaFirJavaInteroperabilityComponent#getJavaGetterName should not throw exception on incomplete code

Backend. Wasm

  • KT-76205 K/Wasm: stabilize and turn on incremental compilation by default
  • KT-83728 [Wasm] Invalid Ir type while suspend call with blocked if null comprehansion
  • KT-81637 K/JS/Wasm interop: Inconsistent behavior of is/as operations for JsReference<C> and C

Compiler

New Features

  • KT-84484 Companion Extensions Analysis & Resolution
  • KT-84298 K2: Generate IR for Companion Blocks & Extensions
  • KT-84292 Enforce Companion Blocks & Extensions Language Feature during Resolution
  • KT-84291 Companion Blocks & Extensions Checkers
  • KT-84290 Callable References to Companion Block Declarations & Extensions
  • KT-84287 Build Raw FIR for Companion Blocks & Extensions
  • KT-73256 Implement all meta-target for annotations
  • KT-84319 Add JVM target bytecode version 26
  • KT-84297 Serialize & Deserialize Companion Block Declarations & Extensions to/from Metadata
  • KT-84199 Implement DontMakeExplicitNullableJavaTypeArgumentsFlexible feature

Fixes

  • KT-80489 Collection literals: experimental version (Frontend)
  • KT-84566 Prevent launching Default dispatcher threads from IJ SDK in kotlin compiler
  • KT-85358 Native: roll back the workaround for KT-84678 once MapLibre has been properly fixed
  • KT-84931 Incorrect type nullability in SAM super type in anonymous class-based SAM conversion
  • KT-83920 False positive "modifier 'value' is not applicable to 'local variable'" with soft keyword in positional destructuring (square bracket) declaration
  • KT-85626 @JvmRecord in commonMain breaks compileCommonMainKotlinMetadata with "Cannot access 'java.lang.Record'"
  • KT-52673 Don't report deprecation warning/error on imports
  • KT-84991 Improve Argument type mismatch diagnostics
  • KT-82216 Sanitize '.kotlin_module' filename
  • KT-84678 K/N: Undefined symbol from SPM-added ObjC frameworks when linking iOS target
  • KT-77726 Move FirUnusedExpressionChecker to the default checkers list
  • KT-85354 checkPsiTypeConsistency: add psi text attachments
  • KT-85479 Improve diagnostic messages for upper bound violations
  • KT-84585 Upper bound violated warning for expansion of type alias in LHS
  • KT-84924 Native: stdlib-cache.lock used by mulitple processes
  • KT-85244 False positive DUPLICATE_BRANCH_CONDITION_IN_WHEN with guard condition
  • KT-78432 No-arg constructor should be generated for regular classes with a value class parameter in case of JvmExposeBoxed
  • KT-85487 Investigate why WrapContinuationForTailCallFunctions does not work in Android Test
  • KT-59633 K2: Implement running AndroidRunner tests with FIR
  • KT-85392 Native: concurrency issues in per-file caches
  • KT-76237 Store File-level annotations in KLIB metadata separately
  • KT-85162 Introduce diagnostics to refine numeric types casting
  • KT-80060 False positive REDUNDANT_CALL_OF_CONVERSION_METHOD in case of overloads
  • KT-85289 False-positive smartcast from == with type parameter based variable
  • KT-83890 return-value-checker: false positive "Unused return value of 'context'" on kotlin.context() functions
  • KT-84106 False negative "NON_EXHAUSTIVE_WHEN": "NoWhenBranchMatchedException" at runtime with sealed and platform type
  • KT-85005 Consider all: target in the checker of repeatable annotations
  • KT-85210 Enabling -XXLanguage:+IntrinsicConstEvaluation breaks highlighting on some broken code
  • KT-85217 Rework implementation supporting simple-to-suspend function conversion
  • KT-85036 Introduce a proper handling of optional expectation annotations in platform checkers during metadata compilation
  • KT-85086 False-negative JVM_EXPOSE_BOXED_CANNOT_BE_THE_SAME
  • KT-84082 [OPT_IN_USAGE_ERROR] duplicates for destructuring declaration
  • KT-84732 Collection literals: "Expected FirCollectionLiteralImpl to be resolved" in RHS of equality operator
  • KT-84841 Collection literals: Drop special treatment of when with expected type
  • KT-85007 Properly implement special rules for kotlin.Result in @JvmExposeBoxed support
  • KT-74383 Support new callable reference nodes in JVM backend
  • KT-84828 Cleanup JVM backend from the old callable references-related code
  • KT-85006 Refine error messages for INAPPLICABLE_ALL_TARGET diagnostic
  • KT-84296 Support Companion Blocks in CFG
  • KT-85058 Remove final field modification in DescriptorRendererOptionsImpl to prevent warnings on JDK 26+
  • KT-85021 False positive SUBCLASS_CANT_CALL_COMPANION_PROTECTED_NON_STATIC error in multi-module project
  • KT-84727 [K/N] Segfault when returning null as generic Int typ...
Read more

Kotlin 2.3.21

Choose a tag to compare

@KotlinBuild KotlinBuild released this 23 Apr 10:11

Changelog

Backend. Wasm

  • KT-84610 [Wasm] Failed to compile klibs in IC mode

Compiler

  • KT-84566 Prevent launching Default dispatcher threads from IJ SDK in kotlin compiler
  • KT-85358 Native: roll back the workaround for KT-84678 once MapLibre has been properly fixed
  • KT-85626 @JvmRecord in commonMain breaks compileCommonMainKotlinMetadata with "Cannot access 'java.lang.Record'"
  • KT-85405 Postpone/Revert DontIgnoreUpperBoundViolatedOnImplicitArguments
  • KT-84678 K/N: Undefined symbol from SPM-added ObjC frameworks when linking iOS target
  • KT-85021 False positive SUBCLASS_CANT_CALL_COMPANION_PROTECTED_NON_STATIC error in multi-module project

JavaScript

  • KT-82395 Support top-level declarations from compiler plugins in JS incremental compilation
  • KT-84475 K/JS: false-positive exportability warnings in multi-module project
  • KT-84633 Kotlin/JS: "Serializer for class not found" error when IR output granularity is whole-program
  • KT-85047 Kotlin/JS: @JsStatic on suspend fun of class companion generates incorrect d.ts
  • KT-84517 K/JS: bad mappings data in outputted Kotlin stdlib source map

Libraries

  • KT-71848 Kotlinx.metadata: Add CompilerPluginData into Km API

Native. C and ObjC Import

  • KT-85399 Kotlin/Native: TypeCastException when casting ObjC Protocol MetaClass with genericSafeCasts enabled
  • KT-85508 K/N: TypeCastException when using nw_parameters_create_secure_tcp block parameter on 2.3.20

Tools. Gradle

  • KT-84729 Update Gradle plugin-publish version to enable configuration cache badge on Gradle plugins portal

Tools. Gradle. Compiler plugins

  • KT-85257 AGP/Compose: MergeMappingFileTask clears R8 artifacts due to @OutputDirectory annotation on AGP 9.1+

Tools. Scripts

  • KT-85105 Scripts: JVM backend internal error (IR lowering) when scratch file contains anonymous object
  • KT-85103 Exception while generating code when explain destructuring decls
  • KT-84842 scriptCompilationClasspathFromContext behavior changed from 2.3.10 to 2.3.20
  • KT-85029 Kotlin Scripting: ScriptDiagnostic reports "at null" instead of error location

Tools. Statistics (FUS)

  • KT-85628 KGP: composite build FUS metrics fail on access of 'configurationTimeMetrics'

Kotlin 2.3.21-RC2

Kotlin 2.3.21-RC2 Pre-release
Pre-release

Choose a tag to compare

@KotlinBuild KotlinBuild released this 16 Apr 13:59

Changelog

Compiler

  • KT-85626 @JvmRecord in commonMain breaks compileCommonMainKotlinMetadata with "Cannot access 'java.lang.Record'"

Native. C and ObjC Import

  • KT-85508 K/N: TypeCastException when using nw_parameters_create_secure_tcp block parameter on 2.3.20

Tools. Scripts

  • KT-85105 Scripts: JVM backend internal error (IR lowering) when scratch file contains anonymous object
  • KT-85103 Exception while generating code when explain destructuring decls

Tools. Statistics (FUS)

  • KT-85628 KGP: composite build FUS metrics fail on access of 'configurationTimeMetrics'

Kotlin 2.3.21-RC

Kotlin 2.3.21-RC Pre-release
Pre-release

Choose a tag to compare

@KotlinBuild KotlinBuild released this 07 Apr 12:24

Changelog

Backend. Wasm

  • KT-84610 [Wasm] Failed to compile klibs in IC mode

Compiler

  • KT-84678 K/N: Undefined symbol from SPM-added ObjC frameworks when linking iOS target
  • KT-84566 Prevent launching Default dispatcher threads from IJ SDK in kotlin compiler
  • KT-85021 False positive SUBCLASS_CANT_CALL_COMPANION_PROTECTED_NON_STATIC error in multi-module project

JavaScript

  • KT-82395 Support top-level declarations from compiler plugins in JS incremental compilation
  • KT-84633 Kotlin/JS: "Serializer for class not found" error when IR output granularity is whole-program
  • KT-85047 Kotlin/JS: @JsStatic on suspend fun of class companion generates incorrect d.ts
  • KT-84517 K/JS: bad mappings data in outputted Kotlin stdlib source map

Libraries

  • KT-71848 Kotlinx.metadata: Add CompilerPluginData into Km API

Tools. Gradle

  • KT-84729 Update Gradle plugin-publish version to enable configuration cache badge on Gradle plugins portal

Tools. Gradle. Compiler plugins

  • KT-85257 AGP/Compose: MergeMappingFileTask clears R8 artifacts due to @OutputDirectory annotation on AGP 9.1+

Tools. Scripts

  • KT-84842 scriptCompilationClasspathFromContext behavior changed from 2.3.10 to 2.3.20
  • KT-85029 Kotlin Scripting: ScriptDiagnostic reports "at null" instead of error location

Kotlin 2.4.0-Beta1

Kotlin 2.4.0-Beta1 Pre-release
Pre-release

Choose a tag to compare

@KotlinBuild KotlinBuild released this 31 Mar 13:10

Changelog

Analysis API

  • KT-83867 OVERLOAD_RESOLUTION_AMBIGUITY false positive with assertEquals in IJ repo
  • KT-83723 [Analysis API] Enable experimental KDoc resolver by default
  • KT-83388 Analysis API: properly support KMP in KotlinPackageProvider

Analysis API. Code Compilation

  • KT-78946 Evaluation of variable with local class in type parameter leads to InventNamesForLocalClasses exception

Analysis API. FIR

  • KT-84711 K2 IDE sometimes loses FIR plugin-generated declarations after file changes
  • KT-84596 Improve K2 Jooq completion performance
  • KT-84525 KaValueParameterSymbol#getHasSynthesizedName returns false for FirDeclarationOrigin.SubstitutionOverride.DeclarationSite
  • KT-68260 K2 AA: InvalidFirElementTypeException “For CALLABLE_REFERENCE_EXPRESSION with text ::lam1, unexpected element of type: no element found” with illegal callable reference call
  • KT-83546 Kotlin analysis reach ClsCustomNavigationPolicy
  • KT-84259 Move CommonDefaultImportsProvider to the frontend independent module
  • KT-82945 Analysis API: KotlinIllegalArgumentExceptionWithAttachments: Expected FirResolvedTypeRef with ConeKotlinType but was FirUserTypeRefImpl
  • KT-71135 AA: exception from sealed inheritors checker when analyzeCopy

Analysis API. Infrastructure

  • KT-84776 The test data manager misses the redundancy check in the update mode
  • KT-84962 The test data manager misses -ea flag
  • KT-84388 Preserve the EOF status in the test data manager to avoid extra changes
  • KT-83905 Analysis API: Improve UX with test data
  • KT-84362 Analysis API tests produce many warnings due to "not yet loaded registry"
  • KT-84279 Test Data Manager fails on a clean build
  • KT-83913 Exclude compiler-based Analysis API tests from Git tracking
  • KT-80379 Extract per-module test generators for AA tests
  • KT-84120 Move CLI modules out of kotlin-compiler-fe10-for-ide
  • KT-83200 Track external dependencies of the Analysis API modules

Analysis API. Light Classes

  • KT-82434 Light classes should prefer enum entries to properties
  • KT-84200 SLC: return type is not boxed for delegated methods with generic original method
  • KT-72451 "CCE: class PsiPrimitiveType cannot be cast to class PsiClassType" with same-named enum class and typealias

Analysis API. PSI

Analysis API. Providers and Caches

  • KT-82731 Analysis API: Limit granular tree change processing to a few files
  • KT-79234 Analysis API: Usage of asMap() on Caffeine caches bypasses stats counters
  • KT-74090 Analysis API: Support dumb mode (restricted analysis)

Analysis API. Standalone

  • KT-83801 Nested typealiases are not correctly indexed in standalone mode

Analysis API. Surface

New Features

  • KT-73534 SAM method API
  • KT-82993 Support explicit backing fields in the Analysis API

Fixes

  • KT-84397 KtDefaultAnnotationArgumentReference should return only results with value name
  • KT-84804 buildSubstitutor does not work correctly with Java type parameters
  • KT-84389 Cover references with ABI and documentation checks
  • KT-57042 K2, Analysis API: KaJavaInteroperabilityComponent#callableSymbol returns null for a Java getter implementing Kotlin property
  • KT-80856 Analysis API: analysisContextModule incorrectly determines the module of an original file when used for dangling file context assignment
  • KT-84363 AA, isUsedAsExpression: Unhandled Non-KtExpression parent of KtExpression: class org.jetbrains.kotlin.psi.KtContractEffect
  • KT-70476 Analysis API: "KtDefaultAnnotationArgumentReference.resolveToSymbols" does not work in FIR implementation
  • KT-68499 Split KtDefaultAnnotationArgumentReference on K1 and K2 implementation
  • KT-70521 Analysis API: Impossible to distinguish between 'iterator' operator calls dispatched with imports from objects
  • KT-77669 Context arguments are missed on implicit invoke calls
  • KT-77670 resolveToCall: extensionReceiver is incorrectly chosed due to a conflict with context parameters for an implicit invoke call
  • KT-68633 K2 AA: IAE "Expected class KaClassSymbol instead of class KaFirEnumEntrySymbol" with enum entry initializer
  • KT-79186 KtCompletionExtensionCandidateChecker does not work for extensions when using callable references of a type
  • KT-83777 Analysis API: The resolution scope of a context module accepts elements from associated dangling files
  • KT-82571 No expected type for overridden property without explicit type
  • KT-83759 Analysis API: Mark platform interface APIs with @KaPlatformInterface
  • KT-83223 Support "Explicit context arguments" in the Analysis API
  • KT-65186 K2: Analysis API: KtExpressionTypeProvider.getExpectedType works incorrectly for the right hand side of assignment expressions
  • KT-76011 KaFirNamedClassSymbol#companionObject doesn't provide generated objects generated by compiled plugins
  • KT-73290 Analysis API: Improve the architecture of content scopes and resolution scopes

Backend. Native. Debug

  • KT-83804 Native: debug information generator converts relative paths to absolute ones

Backend. Wasm

  • KT-83162 K/Wasm: renaming temporary and synthetic variables in the Chrome debugger
  • KT-85008 Develop and publish a demo app using an early version of the component model support
  • KT-65030 K/Wasm: memory allocator for Component Model ABI
  • KT-83607 WasmJS: Production build eliminates 'else if' branch when 'else' is not wrapped with curly braces
  • KT-83728 [Wasm] Invalid Ir type while suspend call with blocked if null comprehansion
  • KT-82803 Kotlin/WASM: Failed to compile the doResume function with if inside catch block
  • KT-83800 [Wasm] Closed world per-module compilation

Compiler

New Features

  • KT-84319 Add JVM target bytecode version 26
  • KT-83165 Collection literals: treat Deprecated(HIDDEN) operators of reasonably
  • KT-84487 "-Xcollection-literals" compiler flag
  • KT-84072 Collection literals: treat visibility of of during resolve correctly
  • KT-80500 Collection literals: Analyze ConeCollectionLiteralAtom in cases their expected type is not fully known
  • KT-80491 Implement fallback mechanism for collection literals
  • KT-80490 Implement overload resolution mechanism for collection literals
  • KT-84484 Companion Extensions Analysis & Resolution
  • KT-84199 Imple...
Read more