Skip to content

Releases: JetBrains/kotlin

Kotlin 2.3.0-Beta1

07 Oct 14:20
Compare
Choose a tag to compare
Kotlin 2.3.0-Beta1 Pre-release
Pre-release

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 thr...
Read more

Kotlin 2.2.21-RC

07 Oct 12:08
Compare
Choose a tag to compare
Kotlin 2.2.21-RC Pre-release
Pre-release

Changelog

Backend. Wasm

  • KT-81372 K/Wasm: JsException: Exception was thrown while running JavaScript code on Safari 18.2/18.3
  • KT-80018 K/Wasm: exceptions don't work properly in JavaScriptCore (vm inside Safari, WebKit)

Compiler

  • KT-81191 K2: "null cannot be cast to non-null type ConeTypeParameterLookupTag" with invalid code
  • KT-80936 NON_PUBLIC_CALL_FROM_PUBLIC_INLINE : @PublishedApi doesn't work for fun interfaces

JavaScript

  • KT-80873 KJS: Stdlib requires ES2020-compatible JS engine due to BigInt type literal
  • KT-79926 Wrong export of interfaces with companions with ES Modules

Native

  • KT-79384 K/N: Application Not Responding: Thread Deadlock

Tools. Gradle

  • KT-81148 Publishing helpers in KGP are incompatible with Isolated Projects
  • KT-80950 KGP breaks configuration cache when signing plugin with GnuPG is applied
  • KT-79047 Gradle compileKotlin fails with configuration cache

Tools. Gradle. Multiplatform

  • KT-81249 Kotlin 2.2.20 broke KMP implementation of Parcelize
  • KT-61127 Remove scoped resolvable and intransitive DependenciesMetadata configurations used in the pre-IdeMultiplatformImport IDE import

Tools. Gradle. Native

  • KT-77732 commonizeCInterop failed with "Unresolved classifier: platform/posix/size_t"
  • KT-80675 Commonized cinterops between "test" compilations produce an import failure

Tools. Maven

  • KT-81218 Kotlin Maven Plugin 2.2.20: Java classes not resolved with enabled incremental compilation without daemon

Tools. Wasm

  • KT-80582 Multiple reloads when using webpack dev server after 2.2.20-Beta2

Kotlin 2.2.20

10 Sep 08:33
Compare
Choose a tag to compare

Changelog

Analysis API

  • KT-78187 Synthetic properties not to be shown as callables
  • KT-72525 K2. red code and KIWA on new-lines in guarded when conditions (with parentheses)
  • KT-74246 KaVisibilityChecker.isVisible is inefficient with multiple calls on the same use-site

Analysis API. Code Compilation

  • KT-78382 K2 IR lowering error when interface extends interface
  • KT-73201 K2 IDE: Error while evaluating expressions with local classes
  • KT-78164 Evaluator: '@JvmName' annotations are not recognized in other modules
  • 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
  • KT-73084 K2 evaluator cannot resolve local variables standing at the closing brace

Analysis API. FIR

Performance Improvements

  • KT-76490 Do not load ast during the contracts phase if no contracts present
  • KT-78132 Do not check FirElementBuilder#tryGetFirWithoutBodyResolve optimization for already resolved declarations

Fixes

  • KT-72227 SOE from recursive value class
  • KT-68977 K2 IDE: Reference to companion object through typealias in a function call does not work
  • KT-72357 Implement partial body resolution
  • KT-76932 Support context parameters on dangling modifier list
  • KT-72407 FirImplementationByDelegationWithDifferentGenericSignatureChecker: FirLazyExpression should be calculated before accessing
  • KT-77602 K2 / Analysis API: KAEWA β€œNo fir element was found for KtParameter” on incorrect context()-call
  • KT-77629 K2: NPE: "org.jetbrains.kotlin.fir.java.declarations.FirJavaTypeParameter.performFirstRoundOfBoundsResolution"
  • KT-76855 Analysis API: KaType.asPsiType returns null for a local inner class in dependent analysis tests
  • KT-72718 ImplicitReceiverValue.createSnapshot creates invalid FIR if receiver is smart-casted
  • KT-76811 Analysis API: resolveToFirSymbol finds a FirPropertySymbol for a KtScript in dependent analysis
  • KT-73586 [Analysis API] Add lazyResolveToPhase(STATUS) before accessing modifiers of members
  • KT-71135 AA: exception from sealed inheritors checker when analyzeCopy
  • KT-75534 K2 AA: "Containing declaration should present for nested declaration class KtNamedFunction" with dangling annotation on top-level anonymous function
  • KT-75687 K2: local variable doesn't get to the do-while scope
  • KT-56543 LL FIR: rework lazy transformers so transformers modify only declarations they suppose to

Analysis API. Infrastructure

  • KT-76809 Analysis API: Dependent analysis tests frequently work with the original element instead of the copied element

Analysis API. Light Classes

  • KT-78835 Find usages of a light constructor from a class with an empty body finds usages of class as well
  • KT-78878 K2. Method shown as unavailable in Java when @JvmExposeBoxed is applied (redundantly) at both class and method level in Kotlin
  • KT-78065 Support "Expose boxed inline value classes" in Light Classes
  • KT-78076 DLC: KotlinDeclarationInCompiledFileSearcher missed accessors if types are boxed
  • KT-77569 SLC: annotation missing from generated no-args constructor
  • KT-75182 K2 AA. False positive red code "Unresolved reference" to a Kotlin method in Java when Kotlin uses a value class with @JvmOverloads
  • KT-77564 Constructor with JvmOverloads and value class shouldn't mark regular constructors private
  • KT-77505 K2: find usages on java accessor methods do not detect kotlin property accessor usages
  • KT-76789 Annotation resolve shouldn't search through non-class members
  • KT-76907 Wrong equality between repeatable annotation and container

Analysis API. Providers and Caches

  • KT-77578 Analysis API: Performance degradation of KaBaseResolutionScope.contains after introduction of library restriction scopes
  • KT-78640 Analysis API: Remove "friend builtins provider" from FirDeclarationForCompiledElementSearcher
  • KT-74907 Analysis API: Apply platform-based library module content restrictions consistently
  • KT-77605 AA: Leaking KaDanglingFileModule through IdeKotlinPackageProvider
  • KT-62474 Analysis API: Improve mergeability and performance of custom search scopes
  • KT-77022 Get rid of ExpectBuiltinPostProcessor workaround
  • KT-77248 Delegation of JavaModuleResolver is restricted to CliJavaModuleResolver
  • KT-76850 LLFirLibrarySession cannot be cast to LLFirResolvableModuleSession
  • KT-76952 Analysis API: when exhaustiveness analysis fails for sealed classes in dangling files
  • KT-72390 Kotlin project full of red code

Analysis API. Standalone

  • KT-78638 Analysis API Standalone: Stdlib builtins are not indexed in STUBS deserialized declaration origin mode

Analysis API. Stubs and Decompilation

  • KT-77496 Support HAS_MUST_USE_RETURN_VALUE metadata flags in FirStubBasedMemberDeserializer
  • KT-77778 Function receivers doesn't have annotations
  • KT-77777 Receiver annotations shouldn't be present on types
  • KT-77538 Support default property accessors with annotations
  • KT-77763 Decompiled stubs miss inline modifier for property accessors
  • KT-77309 Decompiled property from annotation constructor with default value should have a constant initializer
  • KT-77168 Prefer DataInputOutputUtil for serialization/deserialization
  • KT-77117 Flaky WRONG_ANNOTATION_TARGET diagnostic
  • KT-76791 Function signature types are deserialized inconsistently
  • KT-76947 Support functional types with context parameters

Analysis API. Surface

New Features

  • KT-73473 Provide KaExpressionInformationProvider.isUsedAsResultOfLambda
  • KT-77278 Implement psi-based KaFirKotlinPropertyKtPropertyBasedSymbol#hasBackingField
  • KT-70770 KaLocalVariableSymbol: support isLateInit

Performance Improvements

  • KT-78526 Get rid of redundant checkValidity from withPsiValidityAssertion

Fixes

  • KT-77674 Analysis API: Redundant smart cast to the original type
  • KT-76577 Guard KaFirStopWorldCacheCleaner from deadlocks via threads waiting
  • KT-78820 K2: ISE "FIR element class FirErrorExpressionImpl is not supported in constant evaluation" through RedundantValueArgumentInspection
  • KT-75057 Analysis API: Reference to object through typealias in invoke operator call leads to original type
  • KT-79042 Do not restore KaTypePointer if target kind has changed
  • KT-72421 AA: "KtReference.resolveToSymbols" returns empty list when ASSIGN_OPERATOR_AMBGUITY error is present
  • KT-63464...
Read more

Kotlin 2.2.20-RC2

01 Sep 11:58
Compare
Choose a tag to compare
Kotlin 2.2.20-RC2 Pre-release
Pre-release

Changelog

Backend. Wasm

  • KT-80106 devServer in Kotlin/Wasm overwrites defaults, causing missing static paths

Compiler

  • KT-80285 IJ monorepo: broken compilation after 2.2.20-RC update
  • KT-79816 Java Interfaces implemented by delegation have non-null return checks

Native. C and ObjC Import

  • KT-79571 Xcode 26 beta 4: CInteropKT39120TestGenerated.testForwardEnum failed

Tools. Gradle

  • KT-80172 Error message changes depending on the order of applying 'org.jetbrains.kotlin.android' and 'AGP' 9.0+ with built-in Kotlin plugin

Tools. Gradle. Native

  • KT-74864 Enable exporting KDocs by default to ObjC

Kotlin 2.2.20-RC

19 Aug 09:55
Compare
Choose a tag to compare
Kotlin 2.2.20-RC Pre-release
Pre-release

Changelog

Backend. Wasm

  • KT-80018 K/Wasm: exceptions don't work properly in JavaScriptCore (vm inside Safari, WebKit)

Compiler

  • KT-79979 K2: ClassCastException when overriding extension property with delegation
  • KT-79866 kotlinc 2.2.0 silently emits 'NonExistentClass' instead of reporting an error
  • KT-79276 Dexing fails with "Cannot read field X because is null" with 2.2.0
  • KT-79781 Missing MISSING_DEPENDENCY_CLASS when using type alias with inaccessible RHS
  • KT-79547 "UnsupportedOperationException: Not supported" with inlining and value classes
  • KT-79519 Nested type alias is unreachable from another module

Compose compiler

  • b/432262806 Fix target description lookup
  • b/436870733 Prevent lambda memoization in local classes inside a composable
  • b/432485982 Fix AbstractMethodError when overriding function with default parameters

JavaScript

  • KT-79916 K/JS: "Uncaught TypeError" when using 'Xes-long-as-bigint' in compose-html
  • KT-79977 KJS: Long.rotateLeft returns incorrect result when BigInts are enabled
  • 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

Native

  • KT-79075 Stuck on Kotlin_getSourceInfo_core_symbolication

Tools. Compiler plugins. Serialization

  • KT-79695 Serialization does not exclude field-less properties in 2.2.20-Beta2

Tools. Gradle. JS

  • KT-79921 Web Tooling Gradle API does not respect webpack reconfiguration
  • KT-76996 Wasm: js tasks triggers wasm subtasks

Tools. Gradle. Swift Export

  • KT-79554 Swift Export status diagnostic is produced even if swift export is not configured

Tools. Kapt

  • KT-79641 Kapt: too much information is printed in verbose mode
  • KT-79136 K2 kapt: unresolved nested class references in annotation arguments are generated without outer class names

Kotlin 2.2.10

14 Aug 08:36
Compare
Choose a tag to compare

Changelog

Compiler

  • KT-79276 Dexing fails with "Cannot read field X because is null" with 2.2.0
  • 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-78815 Symbol not found: __ZNSt3__117bad_function_callD1Ev error on iOS 15.5 simulator in Xcode 16.3 after update to 2.2.0-Beta2
  • KT-78501 K2: Missing [ABSTRACT_SUPER_CALL] diagnostics for delegated interface method leads to AssertionError: isCompiledToJvmDefault during IR lowering
  • KT-78479 IR lowering failed / Unexpected null argument for composable call
  • KT-76477 Kotlin/Native: fix compiler performance reporting in sources->klib and klibs->binary
  • KT-78736 Missing [NOT_YET_SUPPORTED_IN_INLINE] diagnostics because of incorrect context update
  • KT-77685 "IllegalArgumentException: Sequence contains more than one matching element"
  • KT-76365 K2: Missing ABSTRACT_SUPER_CALL
  • KT-78352 False-positive IDENTITY_SENSITIVE_OPERATIONS_WITH_VALUE_TYPE when comparing with equality operator (==)

Compose compiler

  • KT-78479 Ensure that default transform affects functions entered through a call
  • KT-78490 Fix visibility for default wrappers of protected methods
  • b/408492167 Emit parameter names in Compose source information

JavaScript

  • KT-79050 KJS / IC: "Unexpected body of primary constructor for processing irClass"
  • KT-79089 KJS: Could not load reporter / Cannot find module 'mocha' when running jsNode tests

Native

  • KT-79075 Stuck on Kotlin_getSourceInfo_core_symbolication
  • KT-76178 LLVM Update: symbol '__ZnwmSt19__type_descriptor_t' missing

Native. Runtime. Memory

  • KT-78925 Crash SIGABRT on Apple Watch after updating Kotlin to 2.2.0

Tools. CLI

  • KT-77445 UNRESOLVED_REFERENCE when importing classes from kotlin-stdlib
  • KT-78263 java.lang.NoClassDefFoundError: Could not initialize class com.intellij.psi.impl.PsiSubstitutorImpl
  • KT-78318 Unresolved reference when compiling kotlin/JS project on fresh master

Tools. Compiler Plugins

  • KT-78490 "AssertionError: SyntheticAccessorLowering should not attempt to modify other files" when calling protected open composable with default argument
  • KT-78038 Make jvm-abi-gen compiler plugin output classloader-friendly

Tools. Gradle

  • KT-77023 Support creating KotlinJvmAndroidCompilation in KotlinBaseApiPlugin

Tools. Gradle. JS

  • KT-78504 [2.2.0-RC3] NPM Tasks in 2.2 RCs produce broken/unusable build cache entries

Tools. Gradle. Multiplatform

  • KT-77466 KMP - testFixturesApi and similar configurations do not affect jvmTestFixtures source set
  • KT-68646 Compose extension's metrics/reports dir should use subdirs based on target

Tools. Gradle. Native

  • KT-77977 "Unknown hardware platform: riscv64" on JVM project build

Tools. Incremental Compile

  • KT-78807 Changing ABI fingerprint on non-ABI changes when lambda passed to inlined function

Tools. Kapt

  • KT-77853 K2 KAPT: backend internal error: exception during IR fake override builder
  • KT-79138 K2: KAPT Java Stub Gen: Unresolved reference with @kotlin.Metadata in Java in 2.2.0

Kotlin 2.2.10-RC2

06 Aug 13:53
Compare
Choose a tag to compare
Kotlin 2.2.10-RC2 Pre-release
Pre-release

Changelog

Compiler

  • KT-79276 Dexing fails with "Cannot read field X because is null" with 2.2.0
  • 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-78815 Symbol not found: __ZNSt3__117bad_function_callD1Ev error on iOS 15.5 simulator in Xcode 16.3 after update to 2.2.0-Beta2

JavaScript

  • KT-79050 KJS / IC: "Unexpected body of primary constructor for processing irClass"
  • KT-79089 KJS: Could not load reporter / Cannot find module 'mocha' when running jsNode tests

Native

  • KT-79075 Stuck on Kotlin_getSourceInfo_core_symbolication
  • KT-76178 LLVM Update: symbol '__ZnwmSt19__type_descriptor_t' missing

Tools. Kapt

  • KT-79138 K2: KAPT Java Stub Gen: Unresolved reference with @kotlin.Metadata in Java in 2.2.0

Kotlin 2.2.20-Beta2

29 Jul 12:50
Compare
Choose a tag to compare
Kotlin 2.2.20-Beta2 Pre-release
Pre-release

Changelog

Analysis API. Code Compilation

  • KT-78382 K2 IR lowering error when interface extends interface
  • KT-73201 K2 IDE: Error while evaluating expressions with local classes
  • KT-78164 Evaluator: '@JvmName' annotations are not recognized in other modules

Analysis API. FIR

  • KT-72227 SOE from recursive value class
  • KT-68977 K2 IDE: Reference to companion object through typealias in a function call does not work
  • KT-76490 Do not load ast during the contracts phase if no contracts present
  • KT-72407 FirImplementationByDelegationWithDifferentGenericSignatureChecker: FirLazyExpression should be calculated before accessing

Analysis API. Light Classes

  • KT-78065 Support "Expose boxed inline value classes" in Light Classes
  • KT-78835 Find usages of a light constructor from a class with an empty body finds usages of class as well

Analysis API. Providers and Caches

  • KT-78640 Analysis API: Remove "friend builtins provider" from FirDeclarationForCompiledElementSearcher

Analysis API. Standalone

  • KT-78638 Analysis API Standalone: Stdlib builtins are not indexed in STUBS deserialized declaration origin mode

Analysis API. Surface

New Features

  • KT-73473 Provide KaExpressionInformationProvider.isUsedAsResultOfLambda

Performance Improvements

  • KT-78526 Get rid of redundant checkValidity from withPsiValidityAssertion

Fixes

  • KT-78820 K2: ISE "FIR element class FirErrorExpressionImpl is not supported in constant evaluation" through RedundantValueArgumentInspection
  • KT-75057 Analysis API: Reference to object through typealias in invoke operator call leads to original type
  • KT-79042 Do not restore KaTypePointer if target kind has changed
  • KT-72421 AA: "KtReference.resolveToSymbols" returns empty list when ASSIGN_OPERATOR_AMBGUITY error is present
  • KT-63464 AA: KtPsiTypeProvider#asPsiType doesn't substitute kotlin.Unit
  • KT-75913 K2: SymbolLightLazyAnnotation evaluates arguments and replaces them with constants
  • KT-73184 Analysis API: KaFunctionCallο»Ώ.argumentMapping is unexpectedly deparenthesised
  • KT-78613 PSI: add binary compatibility checks
  • KT-74013 Analysis API: Cover the API surface with @SubclassOptInRequired annotations
  • KT-76614 Move the parser and lexer to a separate module
  • KT-78552 KaFunctionValueParameter is not marked as KaLifetimeOwner
  • KT-71152 Add back SubclassOptInRequired to classes in KaModule.kt
  • KT-77674 Analysis API: Redundant smart cast to the original type

Backend. Wasm

New Features

  • KT-65721 K/Wasm: stop unconditionally exporting any main function from the root package

Fixes

  • KT-73931 WASM: "RuntimeError: illegal cast" with nullable generic
  • KT-65403 [WASM] RuntimeError is thrown instead of ClassCastException
  • KT-79317 [Wasm] Do not throw CCE for ExcludedFromCodegen declarations
  • KT-66085 K/WASM: Runtime error is uncaught with catch (e: Throwable)
  • KT-66072 K/Wasm: improve how exceptions work in JS interop
  • KT-78384 K/Wasm: Incorrect debug info of local declarations in inline function from another file
  • KT-71533 K/Wasm + K2: no error on KClass::qualifiedName usages
  • KT-72220 Wasm: Unclear exception in case of missed dependency
  • KT-71691 No trace on Wasm/JS if an error occurred in initializing global variables in a file with the main function
  • KT-69570 K/Wasm: JsExport with default parameter value compiles to invalid Wasm

Compiler

New Features

  • KT-78792 Report warning for redundant return in expression body
  • KT-45683 Allow generics in contract type assertions
  • KT-71244 Incorporate existing @CheckReturnValue annotation(s) into Kotlin's unused return value checker
  • KT-32313 Support contracts for operator functions
  • KT-76766 Warning is missing for wrong subclass checking
  • KT-65688 Generate when-expressions over final classes via invokedynamic typeSwitch + tableswitch on JDK 21+

Performance Improvements

  • KT-78672 Consider having FirCallableSymbol.callableId null for local properties / parameters
  • KT-77839 K2: consider not creating CallableId for value parameters / variables / fields

Fixes

  • 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-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-79354 IllegalStateException: Debug metadata version mismatch. Expected: 1, got 2 with compiler 2.2.20-Beta1 and stdlib 2.2.0
  • KT-78479 IR lowering failed / Unexpected null argument for composable call
  • KT-77401 [FIR] ParameterNameTypeAttribute.name doesn't support @ParameterName with compile-time constant property argument
  • KT-77986 K2: False negative: "Local classes are not yet supported in inline functions"
  • KT-78843 FIR tree: comments within String concatenation aren't visited in 2.2.0
  • KT-76477 Kotlin/Native: fix compiler performance reporting in sources->klib and klibs->binary
  • KT-78589 "Class does not have member field" caused by delegation from a Java to Kotlin class
  • KT-79076 'IllegalStateException: Cannot serialize error type: ERROR CLASS: Uninferred type' with Exposed column using recursive generic type
  • KT-78726 Split runPsiToIr phase into runPsiToIr and runIrLinker
  • KT-77672 K/N: come up with a fallback strategy for the casts optimization pass
  • KT-76585 K2: RETURN_IN_FUNCTION_WITH_EXPRESSION_BODY is not reported inside initializers of local variables
  • KT-79099 K2: Do not inherit inline modifier
  • KT-76902 Omit type-use annotations from diagnostics
  • KT-79085 Adding -Xreturn-value-checker=full to kotlinc causes "error: conflicting overloads"
  • KT-58988 K2: Deprecate exposing package-private parameter of internal method
  • KT-77199 OPT_IN_USAGE_ERROR is still absent when calling the enum primary constructor
  • KT-72800 K2: java.util.NoSuchElementException when introduce variable
  • KT-79056 Add experimental language version 2.5
  • [KT-78351...
Read more

Kotlin 2.2.10-RC

18 Jul 10:37
Compare
Choose a tag to compare
Kotlin 2.2.10-RC Pre-release
Pre-release

Changelog

Compiler

  • KT-78501 K2: Missing [ABSTRACT_SUPER_CALL] diagnostics for delegated interface method leads to AssertionError: isCompiledToJvmDefault during IR lowering
  • KT-78479 IR lowering failed / Unexpected null argument for composable call
  • KT-76477 Kotlin/Native: fix compiler performance reporting in sources->klib and klibs->binary
  • KT-78736 Missing [NOT_YET_SUPPORTED_IN_INLINE] diagnostics because of incorrect context update
  • KT-77685 "IllegalArgumentException: Sequence contains more than one matching element"
  • KT-76365 K2: Missing ABSTRACT_SUPER_CALL
  • KT-78352 False-positive IDENTITY_SENSITIVE_OPERATIONS_WITH_VALUE_TYPE when comparing with equality operator (==)

Compose compiler

  • KT-78479 Ensure that default transform affects functions entered through a call
  • KT-78490 Fix visibility for default wrappers of protected methods
  • b/408492167 Emit parameter names in Compose source information

Native. Runtime. Memory

  • KT-78925 Crash SIGABRT on Apple Watch after updating Kotlin to 2.2.0

Tools. CLI

  • KT-77445 UNRESOLVED_REFERENCE when importing classes from kotlin-stdlib
  • KT-78263 java.lang.NoClassDefFoundError: Could not initialize class com.intellij.psi.impl.PsiSubstitutorImpl
  • KT-78318 Unresolved reference when compiling kotlin/JS project on fresh master

Tools. Compiler Plugins

  • KT-78490 "AssertionError: SyntheticAccessorLowering should not attempt to modify other files" when calling protected open composable with default argument
  • KT-78038 Make jvm-abi-gen compiler plugin output classloader-friendly

Tools. Gradle

  • KT-77023 Support creating KotlinJvmAndroidCompilation in KotlinBaseApiPlugin

Tools. Gradle. JS

  • KT-78504 [2.2.0-RC3] NPM Tasks in 2.2 RCs produce broken/unusable build cache entries

Tools. Gradle. Multiplatform

  • KT-77466 KMP - testFixturesApi and similar configurations do not affect jvmTestFixtures source set
  • KT-68646 Compose extension's metrics/reports dir should use subdirs based on target

Tools. Gradle. Native

  • KT-77977 "Unknown hardware platform: riscv64" on JVM project build

Tools. Incremental Compile

  • KT-78807 Changing ABI fingerprint on non-ABI changes when lambda passed to inlined function

Tools. Kapt

  • KT-77853 K2 KAPT: backend internal error: exception during IR fake override builder

Kotlin 2.2.20-Beta1

10 Jul 13:40
Compare
Choose a tag to compare
Kotlin 2.2.20-Beta1 Pre-release
Pre-release

Changelog

Analysis API

  • KT-78187 Synthetic properties not to be shown as callables
  • KT-72525 K2. red code and KIWA on new-lines in guarded when conditions (with parentheses)
  • KT-61728 Analysis API: optimize AllCandidatesResolver.getAllCandidates

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
  • KT-73084 K2 evaluator cannot resolve local variables standing at the closing brace

Analysis API. FIR

Performance Improvements

  • KT-78132 Do not check FirElementBuilder#tryGetFirWithoutBodyResolve optimization for already resolved declarations

Fixes

  • KT-72357 Implement partial body resolution
  • KT-77629 K2: NPE: "org.jetbrains.kotlin.fir.java.declarations.FirJavaTypeParameter.performFirstRoundOfBoundsResolution"
  • KT-76855 Analysis API: KaType.asPsiType returns null for a local inner class in dependent analysis tests
  • KT-72718 ImplicitReceiverValue.createSnapshot creates invalid FIR if receiver is smart-casted
  • KT-76811 Analysis API: resolveToFirSymbol finds a FirPropertySymbol for a KtScript in dependent analysis
  • KT-73586 [Analysis API] Add lazyResolveToPhase(STATUS) before accessing modifiers of members
  • KT-71135 AA: exception from sealed inheritors checker when analyzeCopy
  • KT-75534 K2 AA: "Containing declaration should present for nested declaration class KtNamedFunction" with dangling annotation on top-level anonymous function
  • KT-75687 K2: local variable doesn't get to the do-while scope
  • KT-56543 LL FIR: rework lazy transformers so transformers modify only declarations they suppose to

Analysis API. Infrastructure

  • KT-76809 Analysis API: Dependent analysis tests frequently work with the original element instead of the copied element

Analysis API. Light Classes

  • KT-78076 DLC: KotlinDeclarationInCompiledFileSearcher missed accessors if types are boxed
  • KT-77569 SLC: annotation missing from generated no-args constructor
  • KT-75182 K2 AA. False positive red code "Unresolved reference" to a Kotlin method in Java when Kotlin uses a value class with @JvmOverloads
  • KT-77564 Constructor with JvmOverloads and value class shouldn't mark regular constructors private
  • KT-77505 K2: find usages on java accessor methods do not detect kotlin property accessor usages
  • KT-76789 Annotation resolve shouldn't search through non-class members
  • KT-76907 Wrong equality between repeatable annotation and container

Analysis API. Providers and Caches

  • KT-74907 Analysis API: Apply platform-based library module content restrictions consistently
  • KT-77578 Analysis API: Performance degradation of KaBaseResolutionScope.contains after introduction of library restriction scopes
  • KT-77605 AA: Leaking KaDanglingFileModule through IdeKotlinPackageProvider
  • KT-62474 Analysis API: Improve mergeability and performance of custom search scopes
  • KT-77022 Get rid of ExpectBuiltinPostProcessor workaround
  • KT-77248 Delegation of JavaModuleResolver is restricted to CliJavaModuleResolver
  • KT-76850 LLFirLibrarySession cannot be cast to LLFirResolvableModuleSession
  • KT-76952 Analysis API: when exhaustiveness analysis fails for sealed classes in dangling files
  • KT-72390 Kotlin project full of red code

Analysis API. Stubs and Decompilation

  • KT-77496 Support HAS_MUST_USE_RETURN_VALUE metadata flags in FirStubBasedMemberDeserializer
  • KT-77778 Function receivers doesn't have annotations
  • KT-77777 Receiver annotations shouldn't be present on types
  • KT-77538 Support default property accessors with annotations
  • KT-77763 Decompiled stubs miss inline modifier for property accessors
  • KT-77309 Decompiled property from annotation constructor with default value should have a constant initializer
  • KT-77168 Prefer DataInputOutputUtil for serialization/deserialization
  • KT-77117 Flaky WRONG_ANNOTATION_TARGET diagnostic
  • KT-76791 Function signature types are deserialized inconsistently
  • KT-76947 Support functional types with context parameters

Analysis API. Surface

New Features

  • KT-77278 Implement psi-based KaFirKotlinPropertyKtPropertyBasedSymbol#hasBackingField
  • KT-70770 KaLocalVariableSymbol: support isLateInit

Fixes

  • KT-75913 K2: SymbolLightLazyAnnotation evaluates arguments and replaces them with constants
  • KT-78278 ISE: FIR element "class org.jetbrains.kotlin.fir.expressions.impl.FirErrorResolvedQualifierImpl" is not supported in constant evaluation at org.jetbrains.uast.kotlin.internal.FirKotlinUastConstantEvaluator.evaluate
  • KT-73327 Cover all psi inputs with scope validity assertions
  • KT-71876 Support storing parameter names in KaFunctionType
  • KT-77738 AA: inconsistent KaType.allSupertypes regarding multiple iterations
  • KT-73723 K2 AA, KaFirVisibilityChecker: protected member of superclass is not visible from anonymous object
  • KT-78057 [Analysis API, K2] Context parameters are not resolved in KDoc
  • KT-73758 K2 Mode: "KaEvaluator.evaluate" does not work for simple arithmetic expressions
  • KT-72301 K2 AA. PSI should present for declaration built by Kotlin code on property access syntax of generic Java getter through Kotlin subclass
  • KT-77730 K2: Unable to get a light PSI for a nested annotation used with fully-qualified name
  • KT-73216 K2: unresolvable references in type parameters
  • KT-71794 Analysis API: Types with errors have unresolved qualifiers in lambda parameters position
  • KT-65846 Support parameter names in functional type rendering
  • KT-76738 K2 AA: rendering constructor of sealed class inserts protected modifier
  • KT-77515 KaTypeProvider#receiverType should be more tolerant to an error code
  • KT-77333 K2 AA: KaFirTypeProvider.getType: InvalidFirElementTypeException: For TYPE_REFERENCE with text I, unexpected element of type: FirSuperReceiverExpressionImpl found
  • KT-76044 K2 AA: isFun is true for restored symbol of Java interface with several methods
  • KT-77264 KaTypeProvider#type should be more tolerant to an error code
  • KT-77282 KaPropertySymbol: support isDelegatedProperty for libraries
  • KT-77254 K2 AA: expectedType doesn't provide anything for parameter default value
  • KT-74777 KaVariableSymbol.hasBackingField returns incorrect result for libraries
  • KT-77280 Rename KaPropertyAccessorSymbol#isCustom to isNotDefault
  • KT-77210 Analysis API: `scopeContex...
Read more