Releases: JetBrains/kotlin
Releases Β· JetBrains/kotlin
Kotlin 2.0.20-Beta1
Changelog
Analysis. API
New Features
KT-68143
Analysis API: support KtWhenConditionInRange call resolution
Performance Improvements
KT-67195
K2: do not call redundant resolve on body resolution phase for classes
Fixes
KT-66216
K2 IDE. "FirDeclaration was not found for class org.jetbrains.kotlin.psi.KtProperty, fir is null" on incorrect string templateKT-53669
Analysis API: redesign KtSymbolOrigin to distinguish kotlin/java source/library declarationsKT-62889
K2 IDE. FPMISSING_DEPENDENCY_CLASS
on not available type alias with available underlying typeKT-62343
Analysis API: fix binary incopatibility problems cause byKtAnalysisSessionProvider.analyze
being inlineKT-68498
To get reference symbol the one should be KtSymbolBasedReferenceKT-68393
Analysis API: RenameKaClassLikeSymbol. classIdIfNonLocal
toclassId
KT-62924
Analysis API: rename KtCallableSymbol.callableIdIfNonLocal -> callableIdKT-66712
K2 IDE. SOE on settings string template for string variable with the same nameKT-65892
K2: "We should be able to find a symbol" for findNonLocalFunctionKT-67360
Analysis API: KtDestructuringDeclarationSymbol#entries shouldn't be KtLocalVariableSymbolKT-68198
Analysis API: Support application service registration in plugin XMLsKT-68273
AA: supportKtFirKDocReference#isReferenceToImportAlias
KT-68272
AA: KtFirReference.isReferenceToImportAlias doesn't work for references on constructorKT-67996
Analysis API: rename Kt prefix to KaKT-66996
Analysis API: Expose the abbreviated type of an expandedKtType
KT-66646
K2: Expected FirResolvedTypeRef with ConeKotlinType but was FirUserTypeRefImpl from FirJsHelpersKt.isExportedObjectKT-68203
K2: Analysis API: wrong type of receiver value in case of imported object memberKT-68031
LL resolve crash in case of PCLA inference with local objectKT-67851
K2:PsiReference#isReferenceTo
always returns false for references to Java gettersKT-68076
AA: use type code fragments for import alias detectionKT-65915
K2: Analysis API: extract services registration into xml fileKT-68049
Analysis API: do not expose imported symbolsKT-68075
K2: Analysis API: Type arguments for delegation constructor to java constructor with type parameters not supportedKT-65190
AA: reference to the super type is not resolvedKT-68070
AA: KtExpressionInfoProvider#isUsedAsExpression doesn't work for KtPropertyDelegateKT-67748
K2: AllCandidatesResolver modifies the original FirDelegatedConstructorCallKT-67743
K2: Stubs & AbbreviatedTypeAttributeKT-67706
K2: "KtDotQualifiedExpression is not a subtype of class KtNamedDeclaration" from UnusedCheckerKT-68021
Analysis API: do not break the diagnostic collection in a case of exception from some collectorKT-67949
AA: Type arguments of Java methods' calls are not reported as used by KtFirImportOptimizerKT-67988
AA: functional type at receiver position should be wrapped in parenthesisKT-66536
Analysis API: ContextCollector doesn't provide implicit receivers from FirExpressionResolutionExtensionKT-67321
AA: Type arguments of Java methods' calls are not resolvedKT-64158
K2: "KotlinIllegalArgumentExceptionWithAttachments: No fir element was found for KtParameter"KT-60344
K2 IDE. "KotlinExceptionWithAttachments: expectcreateKtCall
to succeed for resolvable case with callable symbol" on attempt to assign value to param named getParamKT-64599
K2: "expectcreateKtCall
to succeed for resolvable case with callable" for unfinished if statementKT-60330
K2 IDE. ".KotlinExceptionWithAttachments: expectcreateKtCall
to succeed for resolvable case with callable symbol" on attempt to assign or compare true with somethingKT-66672
K2 IDE. False positive INVISIBLE_REFERENCE on accessing private subclass as type argument in parent class declarationKT-67750
Analysis API: Removeinfix
modifiers from type equality and subtyping functionsKT-67655
Analysis API: declare a rule how to deal with parameters in KtLifetimeOwnerKT-61775
Analysis API: KtKClassAnnotationValue lacks complete type informationKT-67168
K2: Analysis API: Rendering is broken for JSR-305 enhanced Java typesKT-66689
Analysis API: KtFirPackageScope shouldn't rely on KotlinDeclarationProvider for binary dependencies in standalone modeKT-60483
Analysis API: add isTailrec property to KtFunctionSymbolKT-67472
K2: Analysis API FIR: KtFunctionCall misses argument with desugared expressionsKT-65759
Analysis API: Avoid hard references toLLFirSession
in session validity trackersKT-60272
K2: Implement active invalidation ofKtAnalysisSession
sKT-66765
K2: Analysis API: support classpath substitution with library dependencies in super type transformerKT-67265
K2: status phase should resolve original declarations in the case of classpath subsitutionKT-67244
K2: StackOverflowError in the case of cyclic type hierarchy and library classpath substitutionKT-67080
K2: clearer contract for lazyResolveToPhaseWithCallableMembersKT-65413
K2 IDE: KTOR unresolved serializer() call for@Serializable
class in common codeKT-66713
K2 FIR: Expose a way to get the module name used for name manglingKT-61892
KtType#asPsiType could provide nullability annotationsKT-66122
Analysis API: PassKtTestModule
instead ofTestModule
to tests based onAbstractAnalysisApiBasedTest
Analysis. Light Classes
KT-68275
LC: no arg constructor is not visible in light classesKT-66687
Symbol Light Classes: Duplicate field names for classes with companion objectsKT-66804
Symbol Light Classes: Fields from the parent interface's companion are added to DefaultImpls
Apple Ecosystem
KT-68257
Xcode incorrectly reuses embedAndSign framework when moving to and from 2.0.0KT-65542
Cinterop tasks fails if Xcode 15.3 is used
Backend. Wasm
KT-65798
K/Wasm: make an error on default export usageKT-68453
K/Wasm: "Supported JS engine not detected" in Web WorkerKT-64565
Kotlin/wasm removeEventListener function did not remove the event listenerKT-66099
Wasm: local.get of type f64 has to be in the same reference type hierarchy as (ref 686) @+237036
Compiler
New Features
KT-67611
Implement improved handling of $ in literalsKT-39868
Allow access to protected consts and fields from a super companion object- [
KT-67787
](https://youtrack.je...
Kotlin 2.0.0
Changelog
Analysis. API
New Features
KT-65327
Support reading klib contents in Analysis API
Performance Improvements
KT-65560
K2: Anaysis API: ContextCollector triggers redundant resolution in the case of file elementsKT-64987
Analysis API: 50GB memory allocation on creating empty kotlinx.collections.immutable.persistentMapOfKT-61789
K2: optimize getFirForNonKtFileElement for references inside super type referenceKT-59498
K2: getOnAirGetTowerContextProvider took too much time due to on air resolveKT-61728
Analysis API: optimize AllCandidatesResolver.getAllCandidates
Fixes
KT-65561
Analysis API: dummy.kt is not a physical fileKT-65616
K2: FirDeclarationStatusImpl cannot be cast to FirResolvedDeclarationStatus from STATUSKT-65600
Analysis Api: FirFile for KtCodeFragments are created and not updated on changesKT-64919
K2 IDE: Implement KMP support for sealed class inheritorsKT-64241
K2: Unresolved calls to functions in scripts depending on included projectsKT-65813
Analysis API Standalone:FirDeclarationForCompiledElementSearcher
does not find compiled elementsKT-66052
AA: render expect/actual modifierKT-66795
KtCodeFragment.clone() is brokenKT-66532
K2 CodeGen AA: missing annotation setup for function in source module but not in a compile target fileKT-64833
Analysis API: Members implemented by delegation have no overridden symbolsKT-62405
Analysis API: SymbolsSUBSTITUTION_OVERRIDE
have no overridden symbolsKT-66749
K2: "Collection contains no element matching the predicate" on an unresolved callKT-62832
K2: ClassCastException: FirDeclarationStatusImpl cannot be cast to FirResolvedDeclarationStatusKT-66719
AbstractGetKlibSourceFileNameTest: The dependency to ":native:analysis-api-klib-reader" breaks JPS compilationKT-66603
Analysis API: support type annotations in KtPsiTypeProviderMixIn#asPsiTypeKT-64505
Analysis API Standalone: Remove test-specific calculation of sealed class inheritorsKT-66013
Analysis API Standalone: Sealed inheritors aren't correctly calculated for source classesKT-62880
K2 IDE: Unresolved java annotation methods in KDocKT-66530
K2: Analysis API: KtPsiTypeProvider#asKtType crashes on PsiClassType for Java type parameter with wrong use siteKT-65571
Support VirtualFile inputs to Analysis API modulesKT-66485
Substituted types are not provided for callable referencesKT-66498
Analysis API: 'KtFe10SymbolDeclarationOverridesProvider' considers a class to be a subclass of itselfKT-64579
K2 IDE: "Expected FirResolvedArgumentList for FirAnnotationCallImpl of FirValueParameterImpl(Source) but FirArgumentListImpl found"KT-65978
Analysis API: Use soft references inFileStructureCache
KT-64051
K2 IDE: Analysis API: Unresolved links to typealias in KDocKT-66189
K2 / IDE: KtFirExpressionTypeProvider bugsKT-61422
K2 IDE: "No array element type for vararg value parameter: org.jetbrains.kotlin.fir.declarations.impl.FirValueParameterImpl"KT-66276
K2: Analysis API:TYPECHECKER_HAS_RUN_INTO_RECURSIVE_PROBLEM
false positive for script parameterKT-66232
K2: Analysis API: cover ScriptWithCustomDefDiagnosticsTestBaseGenerated by LL FIR testsKT-60996
K2: Stub Based Deserializer: Set versionRequirements to enable VERSION_REQUIREMENT_DEPRECATION diagnosticsKT-66306
K2: Analysis API: drop ability to enable global phase resolve lockKT-55750
LL FIR: Implement multi-threaded resolveKT-65563
Analysis API: Missing session componentFirExpectActualMatchingContextFactory
inLLFirLibrarySession
KT-66173
K2: No 'org.jetbrains.kotlin.fir.scopes.impl.FirDelegatedMembersFilter' in array owner: LLFirLibrarySessionKT-66238
Gradle kotlin build scripts - a lot of unresolved symbols after latest changes in kotlin masterKT-65099
K2: Recursive local storage cache check for Fir2IrDeclarationStorage::createAndCacheIrPropertySymbols()KT-65265
Analysis API: Add library session invalidation testsKT-56288
Analysis API: Add tests for session invalidation on the Analysis API sideKT-64000
K2: make AnnotationArgumentsStateKeepers more accurateKT-63606
K2: Analysis API: rewrite FirLazyAnnotationTransformer to avoid redundant transformationsKT-65191
KtFirMultiplatformInfoProvider#getExpectForActual doesn't return expect function for slightly broken codeKT-62136
Analysis API: Add concurrent tests forCleanableSoftValueCache
KT-61222
K2: Add lifecycle management forKtResolveExtension
KT-65960
Analysis API: Test infrastructure indexes binary libraries from decompiled files instead of stubs during IDE mode testsKT-65240
K2: CodeGen API fails to resolve Annotation parameter type when it runs FIR2IR for a class with a parent class from other module if the parent class has an annotation from another moduleKT-65344
K2: make FirScript statements (declarations) independentKT-65930
AA: receiver type forInt?::foo
misses nullabilityKT-65914
AA: receiver type forthis::foo
returns return type of the target callableKT-62071
Analysis API: KtFirScopeProvider.getScopeContextForPosition throws exception when ImplicitReceiverValue.implicitScope is nullKT-65780
K2: polish FileStructure implementation for FirFileKT-62840
K2 Script: everything around destructuring declaration on top level of scripts are brokenKT-64528
K2 IDE: MPP: unregistered component 'org.jetbrains.kotlin.fir.scopes.impl.FirDelegatedMembersFilter'KT-64921
K2 IDE: references in platform code resolve to expect classifier instead of actualKT-61296
K2: do not resolve the entire file on lazyResolve call if FirFile is passedKT-65683
Analysis API: Dangling file session creation causes acomputeIfAbsent
contract violationKT-64884
K2 IDE. FP [NAMED_PARAMETER_NOT_FOUND] for copy method of library data class when class has not parameter-propertiesKT-65763
K2: value parameter from library data class copy have RAW_FIR phaseKT-65665
Analysis API: supportKtDelegatedSuperTypeEntry
inKtFirExpressionInfoProvider.isUsedAsExpression
KT-62899
K2 IDE. IDE ignores@Suppress
annotation for errorsKT-65655
Analysis API:KtCodeCompilationException
should not strongly reference FIR sessionsKT-62302
Support PsiType -> KtType conversionKT-64604
K2: IDE K2: "Modules are inconsistent during performance tests"KT-65345
K2: unify FirDesignation and ...
Kotlin 2.0.0-RC3
Changelog
Apple Ecosystem
KT-67892
KotlinNativeLink task instantiates with a fixed list of apiFiles
Compiler
KT-67993
K2: PCLA Inference throws exception with local objectsKT-67912
K2: Cannot inference type properly from inline function with Type parameterKT-68056
Prohibit referencing java field in case of conflict with property from companion object of the derived classKT-67609
K2: False negative INFERRED_TYPE_VARIABLE_INTO_EMPTY_INTERSECTION_ERRORKT-67875
K2: Resolution ambiguity between Iterable and varargsKT-67699
Not enough information to infer type argument for 'Error' using Arrow's Raise context receiver since Kotlin 2.0.0-Beta3KT-59897
K2: Disappeared PACKAGE_OR_CLASSIFIER_REDECLARATIONKT-50020
K2: False-negative USAGE_IS_NOT_INLINEABLE when lambda in receiver positionKT-67810
K2: public-API inline function cannot access non-public-API annotation enum
JavaScript
KT-67978
K2: Declaration of such kind (expect) cannot be exported to JavaScript
Native
KT-67218
Native: nested classes in kx.serialization ProtoBuf produce empty array for release binary
Tools. Gradle
KT-67746
Indicate for users they need to apply the new Kotlin Compose Gradle pluginKT-67387
Enable intrinsic remember by default in compose compiler gradle pluginKT-67762
Rename Kotlin Compose Compiler plugin on Gradle portalKT-67778
Clarify documentation for compose metricsDestination property
Tools. Gradle. Multiplatform
KT-67806
KMP import fails if android target has flavorsKT-67636
Gradle configuration error when use withJava()KT-67042
K2: Unresolved reference 'convertRadiusToSigma'
Tools. Scripts
KT-67727
Kotlin Scripting with language version 2.0 fails during IR lowering on empty scripts
Tools. Wasm
KT-67785
Kotlin/Wasm: Node.JS 22 does not need experimental-wasm-gc flag anymore
1.9.24
Changelog
Backend. Wasm
KT-64890
K/Wasm compiler crash with external class and Kodein
Compiler
KT-65235
JDK 21 might lead to change in overloads resolutionKT-66768
K1: False positive UNRESOLVED_REFERENCE in super.getFirst/getLast call
Native
KT-67218
Native: nested classes in kx.serialization ProtoBuf produce empty array for release binary
Tools. Gradle
Tools. Gradle. Multiplatform
KT-67127
KMP: IDE Dependency Resolver for CInterops reports errors on linux and windows machinesKT-66514
Don't get output file from Cinterop task for IDE Import if host os doesn't support it
Tools. JPS
KT-65043
JPS dumb mode should respect maps needed for the compiler
Tools. Wasm
Kotlin 2.0.0-RC2
Changelog
Backend. Wasm
KT-66515
Wasm: "call param types must match" during the buildKT-67435
K/Wasm: import.meta.url transforming into absolute local path in webpackKT-66905
K/Wasm: support new version of exception handling proposal
Compiler
New Features
KT-59688
K2: consider removing smartcasts only from the only visibile property with specific name, not from all of them
Performance Improvements
KT-67388
FP intellij: performance degradation in build 611KT-67507
K2: Slow compilation times when a class has a lot of possibly conflicting declarations
Fixes
KT-57678
K2: Inconsistency in how K2 analyzes unresolved code for loops and changing closuresKT-66976
Some value class diagnostics are missedKT-54920
K2:when
with a single branch stops being exhaustive the second time it's doneKT-67307
K2: "Cannot find cached type parameter by FIR symbol" in JpaRepository.saveAllKT-65771
K2: "IndexOutOfBoundsException: Cannot pop operand off an empty stack" when calling method imported using typealias as callable qualifierKT-67502
K2: "property must be initialized or be abstract" with try-finally in secondary constructorKT-67456
K2: "property must be initialized or be abstract" depending on constructor declaration orderKT-67628
K2: "IllegalArgumentException: Expected nullable type" β alias of nullable type analyzed as non-nullable in type parameterKT-67625
K2: Array aliases can't be used as vararg valuesKT-67624
K2: False negative "The feature "break continue in inline lambdas" is experimental and should be enabled explicitly" in elvis operatorKT-60271
K2: origins are not set on compare operatorsKT-44557
Implement main function detection to FIRKT-67593
K2: false negative SUPER_CALL_WITH_DEFAULT_PARAMETERSKT-67484
K2: FIR2IR generates incorrect access to f/o of lateinit internal varKT-67486
K2: Calling method from a Java (implementing a Kotlin class) with named parameters is no longer possible if Java method has different parameter namesKT-47382
JVM / IR: "AssertionError: Unbound private symbol IrFieldSymbolImpl" caused by string template in constructor and extension propertyKT-67581
K2: Compiler fails on actualizing abstract class with sealed Java class via type aliasKT-67014
K1/K2 handle when expression as annotation target differentlyKT-67254
K1/K2 both allow annotations on loops, assignments, array setsKT-67224
K2/Native: Member overrides different '@Throws
' filter from separate moduleKT-66960
K2. KMP. False negative'when' expression must be exhaustive
without sealed class inheritor from common source-setKT-63466
@NonNull
on a type-variable usage doesn't take precedence over a wildcard type argumentKT-56134
K2: NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER diagnostic is reported for the wrong symbolKT-59872
K2: Disappeared TYPE_MISMATCHKT-67192
K2: Disappeared TYPE_MISMATCH [3]KT-67191
K2: Disappeared TYPE_MISMATCH [4]KT-64860
K2: Consider using different ConstraintPosition when fixing variables for PCLAKT-67189
K2: Disappeared TYPE_MISMATCH [5]KT-67551
K2: No wrong annotation target error forfor
statementKT-67367
K2: Incorrect resolution to top-level function with less specific signature in presence of SAM constructor on the same tower levelKT-67374
K2: Object is not smartcasted to type parameter typeKT-67264
K2: "argument type mismatch" with suspend lambda and java wildcardKT-67221
K2: "new inference error [NewConstraintError at Incorporate TypeVariable" for captured typeKT-67311
K2: "Argument type mismatch" caused by lambda type when using named argumentsKT-62043
K2: Fix FirCompileKotlinAgainstCustomBinariesTest.testRawTypesKT-66743
Lambda receivers and anonymous function parameters of inaccessible types are allowedKT-67315
K2: Some default imports are not excludedKT-56126
Avoid using descriptors at JvmPlatformAnalyzerServices::computePlatformSpecificDefaultImportsKT-66513
K2: Suppressing OPT_IN_USAGE_ERROR is now a warning in K2, preventing safe code gen compatible with -WerrorKT-67314
PCLA works inconsistently with smart-cast related CS forksKT-67144
K2: potential NPE when assigning to unstable varsKT-66971
K2: missing SMARTCAST_IMPOSSIBLE on open val declared in another moduleKT-66904
K2: possible NPE when reassigning captured variablesKT-67212
K2: "Failed to find functional supertype for class org.jetbrains.kotlin.fir.types.ConeCapturedType"KT-67283
K2: No SAM conversion for fun interface with abstract toStringKT-66768
K1: False positive UNRESOLVED_REFERENCE in super.getFirst/getLast callKT-67318
Compiler fails with OutOfMemoryError on combination of PCLA+smart castKT-65812
K2: "OutOfMemoryError: Java heap space" in kotlin.utils.SmartList.addKT-66956
K2: false negative CONST_VAL_WITH_NON_CONST_INITIALIZER for inc/dec operatorsKT-67205
K2: can't deserialize annotation with local class as argumentKT-65449
K2: build KAPT user project and pass it to CIKT-67142
K2: IrFakeOverrideBuilder: AbstractMethodError on raw type argument in a Java superclassKT-62570
IncompatibleClassChangeError due to overriding final methodKT-67190
K2: Disappeared TYPE_MISMATCH [2]KT-67188
K2: Disappeared TYPE_MISMATCH [6]KT-67187
K2: Disappeared TYPE_MISMATCH [1]KT-63381
IrFakeOverrideBuilder: PublishedApi affects overridability of internal membersKT-59856
K2: Check ConeDiagnostics that are not mapped to KtDiagnosticsKT-57502
K2: Smart casts should be forbidden if variable that remembers the smart cast is declared by delegationKT-63967
K2: Missing getterSignature in metadata for script variablesKT-59372
K2: Missing SELF_CALL_IN_NESTED_OBJECT_CONSTRUCTOR_ERRORKT-60526
K2: Fix the TODO inconvertToIr.kt
KT-67027
K2: Review all use-sites of annotation arguments utilitiesKT-66953
K2: toByte() call on Char leads to ClassCastException for klib backendsKT-65415
K2: Stdlib K2 build error: IrConstructorSymbolImpl is already bound
IR. Actualizer
KT-67488
K2: AssertionError No such value argument slot in IrConstructorCallImpl: 0 (total=0
JavaScript
- [
KT-66922
](https://youtrack.jetbrains.com/is...
Kotlin 2.0.0-RC1
Changelog
Analysis. API
Fixes
KT-65616
K2: FirDeclarationStatusImpl cannot be cast to FirResolvedDeclarationStatus from STATUSKT-64241
K2: Unresolved calls to functions in scripts depending on included projectsKT-65813
Analysis API Standalone:FirDeclarationForCompiledElementSearcher
does not find compiled elementsKT-66052
AA: render expect/actual modifierKT-66795
KtCodeFragment.clone() is brokenKT-66532
K2 CodeGen AA: missing annotation setup for function in source module but not in a compile target fileKT-65561
Analysis API: dummy.kt is not a physical fileKT-64833
Analysis API: Members implemented by delegation have no overridden symbolsKT-62405
Analysis API: SymbolsSUBSTITUTION_OVERRIDE
have no overridden symbolsKT-66749
K2: "Collection contains no element matching the predicate" on an unresolved callKT-66719
AbstractGetKlibSourceFileNameTest: The dependency to ":native:analysis-api-klib-reader" breaks JPS compilationKT-66603
Analysis API: support type annotations in KtPsiTypeProviderMixIn#asPsiTypeKT-64505
Analysis API Standalone: Remove test-specific calculation of sealed class inheritorsKT-66013
Analysis API Standalone: Sealed inheritors aren't correctly calculated for source classesKT-62880
K2 IDE: Unresolved java annotation methods in KDocKT-66530
K2: Analysis API: KtPsiTypeProvider#asKtType crashes on PsiClassType for Java type parameter with wrong use siteKT-66485
Substituted types are not provided for callable referencesKT-66498
Analysis API: 'KtFe10SymbolDeclarationOverridesProvider' considers a class to be a subclass of itselfKT-66189
K2 / IDE: KtFirExpressionTypeProvider bugsKT-59732
FirLazyResolveContractViolationException:lazyResolveToPhase(IMPORTS)
cannot be called from a transformer with a phase IMPORTS from serialisation plugin
Analysis. Light Classes
KT-66692
SLC:findAttributeValue
for attribute w/ default value in Java returnsnull
Apple Ecosystem
KT-66446
Diagnostic never showed, and build fails when CocoaPods dependency is used with embedAndSign task and linking type is dynamicKT-66445
Diagnostic never showed when CocoaPods dependency is used with embedAndSign task and linking type is static
Backend. Wasm
KT-66471
Null method reference with Kotlin/Wasm on 2.0.0-Beta4KT-65210
K/Wasm::class
operator produces Number KClass for Short expressionKT-58088
[PL] Support & enable partial linkage for WasmKT-66104
Wasm: compiler crash: NoSuchElementException: Sequence contains no element matching the predicateKT-64449
K2: Implement K1WasmWasiCodegenBoxTestGenerated for K2KT-61263
K/Wasm: add a way to turn on k2 in wasm examples using Compose
Compiler
New Features
KT-32754
Choose existing extensions over additional built-ins members from JDK except overridesKT-64350
K2: deprecate using typealias as a callable qualifier in importsKT-62547
Introduce a language feature flag for smartcasts based on "memory" variables
Performance Improvements
KT-65005
K2: Investigate testCommonSuperTypeContravariant performanceKT-65579
K2: performance regression in FP SpaceKT-61121
[K/N] Kotlin Native compiler performance is slow when generating large frameworks
Fixes
KT-67185
K2: Incorrect coercion-to-Unit leading to CCE at runtimeKT-63836
K2: No deprecation error message in common metadata compilationKT-57618
K2: complex deprecation messages are not printed in the errorKT-61787
K2 doesn't report warnings for some Gradle tasksKT-62063
K2: drop pre-release flag in 2.0-RCKT-65578
K2: implement a deprecation warning for KT-57014 (wrong nullability returned from JDK SAM constructor lambda)KT-65120
K2 Consider turn into platform checkers ones which checks for objCKT-67090
K2: Exception from metadata compilation when compiling class with annotations from dependenciesKT-59479
K2: build KorGEKT-62560
K2: KAPT4: annotation@ReplaceWith
is missing a default value for the element 'imports'KT-67027
K2: Review all use-sites of annotation arguments utilitiesKT-60096
K2: Introduced API_NOT_AVAILABLEKT-64151
K2: consider implementing FIR-level constant evaluationKT-65195
K2: Unexpected exception when executing dynamic array element inc/decKT-63416
K2 / Contracts: False positive "Leaked in-place lambda" warning caused by suspend lambda with callsInPlace contractKT-57812
K2: support serialization of type annotation's argumentsKT-66717
Incorrect diagnostics around intersection property overridesKT-65603
K2: No approximation is done on public, but effectively private propertyKT-59932
K2: Disappeared AMBIGUOUS_ANONYMOUS_TYPE_INFERREDKT-66527
K2: type mismatch on override for typeKT-59400
K2: Missing CANNOT_INFER_VISIBILITYKT-64534
K2: org.jetbrains.kotlin.util.FileAnalysisException: Somewhere in fileKT-65649
K2: IR has incorrect origins for some inplace updating operatorsKT-66748
K2: False-positive AMBIGUOUS_SUPER in toStringKT-67013
K2: ClassCastException: class FirConstructorSymbol cannot be cast to class FirNamedFunctionSymbolKT-52175
K2: WRONG_ANNOTATION_TARGET for annotation that used inside ifKT-66902
K2: "Named arguments are prohibited for non-Kotlin functions" with Java interopKT-66793
K2: "assigning single elements to varargs in named form is prohibited." caused by varargs supplied from java with elvis operatorKT-65235
JDK 21 might lead to change in overloads resolutionKT-66350
K2: "IllegalStateException: Unsupported compile-time value STRING_CONCATENATION" when evaluating an annotation argument stringKT-65035
IrFakeOverrideBuilder: AbstractMethodError on inheritance from Java subclass of CharSequence with inherited implementationsKT-66447
Implement KT-59138 under a language featureKT-66701
K2: Java interface method override via Kotlin class rejectedKT-66730
K2: False positive RETURN_TYPE_MISMATCH in return statement in SAM constructorKT-66909
K2: Implement a diagnostic for returning null from a lambda with expected return type Unit!KT-66570
Generic wildcard upper bound inference errorKT-65272
K2: invoke operator applies "restricted suspen...
Kotlin 2.0.0-Beta5
Changelog
Analysis. API
New Features
KT-65327
Support reading klib contents in Analysis API
Performance Improvements
KT-65560
K2: Anaysis API: ContextCollector triggers redundant resolution in the case of file elements
Fixes
KT-65571
Support VirtualFile inputs to Analysis API modulesKT-65600
Analysis Api: FirFile for KtCodeFragments are created and not updated on changesKT-64579
K2 IDE: "Expected FirResolvedArgumentList for FirAnnotationCallImpl of FirValueParameterImpl(Source) but FirArgumentListImpl found"KT-65978
Analysis API: Use soft references inFileStructureCache
KT-64051
K2 IDE: Analysis API: Unresolved links to typealias in KDocKT-66276
K2: Analysis API:TYPECHECKER_HAS_RUN_INTO_RECURSIVE_PROBLEM
false positive for script parameterKT-66232
K2: Analysis API: cover ScriptWithCustomDefDiagnosticsTestBaseGenerated by LL FIR testsKT-60996
K2: Stub Based Deserializer: Set versionRequirements to enable VERSION_REQUIREMENT_DEPRECATION diagnosticsKT-66306
K2: Analysis API: drop ability to enable global phase resolve lockKT-64919
K2 IDE: Implement KMP support for sealed class inheritorsKT-65563
Analysis API: Missing session componentFirExpectActualMatchingContextFactory
inLLFirLibrarySession
KT-66173
K2: No 'org.jetbrains.kotlin.fir.scopes.impl.FirDelegatedMembersFilter' in array owner: LLFirLibrarySessionKT-66238
Gradle kotlin build scripts - a lot of unresolved symbols after latest changes in kotlin masterKT-65099
K2: Recursive local storage cache check for Fir2IrDeclarationStorage::createAndCacheIrPropertySymbols()KT-65265
Analysis API: Add library session invalidation testsKT-56288
Analysis API: Add tests for session invalidation on the Analysis API sideKT-64000
K2: make AnnotationArgumentsStateKeepers more accurateKT-63606
K2: Analysis API: rewrite FirLazyAnnotationTransformer to avoid redundant transformationsKT-65191
KtFirMultiplatformInfoProvider#getExpectForActual doesn't return expect function for slightly broken codeKT-62136
Analysis API: Add concurrent tests forCleanableSoftValueCache
KT-61222
K2: Add lifecycle management forKtResolveExtension
KT-65960
Analysis API: Test infrastructure indexes binary libraries from decompiled files instead of stubs during IDE mode testsKT-65240
K2: CodeGen API fails to resolve Annotation parameter type when it runs FIR2IR for a class with a parent class from other module if the parent class has an annotation from another moduleKT-65344
K2: make FirScript statements (declarations) independentKT-65930
AA: receiver type forInt?::foo
misses nullabilityKT-65914
AA: receiver type forthis::foo
returns return type of the target callableKT-65780
K2: polish FileStructure implementation for FirFileKT-62840
K2 Script: everything around destructuring declaration on top level of scripts are brokenKT-65683
Analysis API: Dangling file session creation causes acomputeIfAbsent
contract violationKT-64884
K2 IDE. FP [NAMED_PARAMETER_NOT_FOUND] for copy method of library data class when class has not parameter-propertiesKT-65763
K2: value parameter from library data class copy have RAW_FIR phaseKT-65665
Analysis API: supportKtDelegatedSuperTypeEntry
inKtFirExpressionInfoProvider.isUsedAsExpression
KT-65655
Analysis API:KtCodeCompilationException
should not strongly reference FIR sessionsKT-65345
K2: unify FirDesignation and LLFirResolveTarget
Analysis. Light Classes
KT-61734
SLC: wildcard suppression not honoredKT-65112
Symbol Light Classes don't support annotations on type parametersKT-65843
K2: Light method returnskotlin.Unit
type forTestResult
return typeKT-65653
SLC: wrong binary resolution to function with value classKT-65393
SLC: missing deprecated-hidden propertyKT-64772
SLC: presence of source PSI for compiler-generated declaration
Apple Ecosystem
KT-62373
"Xcode higher than tested" diagnosticKT-64096
Diagnostic when embedAndSign used for framework with cocoapods-dependencies
Backend. Native. Debug
KT-65553
K2: Native: kt42208WithPassingLambdaToAnotherFunction test fails with K2
Backend. Wasm
New Features
KT-58088
[PL] Support & enable partial linkage for WasmKT-66327
Include information about particular Wasm target into KLib manifestKT-65009
Generate TypeScript definitions for the@JsExport
declarations in K/Wasm
Fixes
KT-65660
[WasmJs] Support catching JS exceptionsKT-64890
K/Wasm compiler crash with external class and KodeinKT-66104
Wasm: compiler crash: NoSuchElementException: Sequence contains no element matching the predicateKT-66065
[Wasm] Make specialisations for closured primitive valuesKT-65778
Create the same TypeScript tests infrastructure for Kotlin/Wasm that we have now for Kotlin/JSKT-65411
Kotlin/Wasm: Boolean boxed instances are not the sameKT-65713
Kotlin/Wasm generates a wrapper that cannot run in DenoKT-65777
Implement named export for Kotlin/WasmKT-65824
Wasm: Allow unsigned primitives to be used inside functions annotated with@JsExport
KT-63939
Kotlin/Wasm Support lazy associated object initialisationKT-61888
[Kotlin/wasm] in kotlin.test support for@AfterTest
for async tests
Compiler
New Features
KT-64350
K2: deprecate using typealias as a callable qualifier in importsKT-65478
JVM: Change inlined variable naming formatKT-26565
Choose existing extensions over additional built-ins members from JDKKT-65859
Calls refinement extension pointKT-45375
Generate all Kotlin lambdas via invokedynamic + LambdaMetafactory by defaultKT-65681
K2: Improve error message of UPPER_BOUND_VIOLATED when upper bound is a captured type or other non-denotable typeKT-65153
K/N: extract liveness analysis to a separate phaseKT-59098
Support -Xjdk-release=1.6/1.7 with -jvm-target 1.8KT-63670
Implement platform specific declaration clash diagnostics across all backends
Performance Improvements
Kotlin 1.9.23
1.9.23
Apple Ecosystem
KT-65542
Cinterop tasks fails if Xcode 15.3 is used
Backend. Wasm
KT-64486
Kotlin/Wasm/WASI exported function callback for coroutines support
Compiler
KT-53478
Could not load moduleKT-66044
JDK's new API is used over Kotlin's SDK functionsKT-64640
Prevent mutating SequenceCollection methods from JDK 21 be available on read-only collectionsKT-65441
K1: Remove JDK 21 getFirst()/getLast() in (Mutable)List interfacesKT-65634
K/N: data race during monolithic cache creationKT-53109
CompilationErrorException generateUnboundSymbolsAsDependencies with builder inference and lambdasKT-52757
Type inference for builders fails if inferred from a function
Tools. Gradle
KT-65792
Add JSON build reportKT-65091
Update compiler metrics in build reportsKT-62490
KGP dropping resource directories
Tools. Gradle. JS
KT-64119
K/JS: Migrate package manager from Yarn onto NPMKT-64561
K/JS tests are not executed after upgrade to 1.9.22
Tools. Gradle. Multiplatform
KT-65954
commonTest dependencies affect commoMainMetadata compilation
Tools. Gradle. Native
KT-64573
Default value forproduceUnpackedKlib
was not provided
Kotlin 2.0.0-Beta4
Changelog
Analysis. API
Performance Improvements
KT-64987
Analysis API: 50GB memory allocation on creating empty kotlinx.collections.immutable.persistentMapOf
Fixes
KT-65268
K2: Checking the presence of the delegated constructor call forces AST loadingKT-63330
Analysis API: Stub-based deserialized symbol providers provide unresolved enum entry annotation argumentsKT-65418
Analysis API:LLFirAbstractSessionFactory
loads anchor module sessions eagerlyKT-64718
Analysis API: do not expose SealedClassInheritorsProvider and FirRegularClass to IDE PluginKT-65075
K2: getContainingDeclaration() is broken for declarations inside code fragmentsKT-61332
SupportKtTypeCodeFragment
inPsiRawFirBuilder
KT-65150
AA: incorrect result fromKtTypeProvider#getReceiverTypeForDoubleColonExpression
for Java static methodKT-55750
LL FIR: Implement multi-threaded resolveKT-56551
LL FIR: implement parallel resolve for jumping phasesKT-65223
Psi: avoid KtFile usagesKT-65307
Analysis API FE10: support KtFe10AnalysisSessionProvider.getAnalysisSessionByUseSiteKtModuleKT-62695
K2 IDE: Unresolved extension functions in KDocKT-65152
Analysis API: KDoc references to packages are not fully resolvedKT-64988
K2 IDE: Navigation from the named argument in safe call does not workKT-64074
K2: Investigate LL divergence for Script.testTopLevelPropertyInitializationKT-64921
K2 IDE: references in platform code resolve to expect classifier instead of actualKT-62441
K2: IDE K2: "No dangling modifier found"KT-64528
K2 IDE: MPP: unregistered component 'org.jetbrains.kotlin.fir.scopes.impl.FirDelegatedMembersFilter'KT-64993
Analysis API: KtExpressionTypeProvider.getExpectedType works incorrectly for arguments of safe callsKT-64883
Allow direct creation of KtCommonFileKT-64646
K2: properly forbid ast loading during raw fir phase in testsKT-64862
Psi: missed parenthesis in type reference presentationKT-62893
K2 IDE. FP 'when' expression must be exhaustive with Java sealed interface from libraryKT-63795
K2:lazyResolveToPhase(BODY_RESOLVE)
cannot be called from a transformer with a phase BODY_RESOLVE from SealedClassInheritorsProviderIdeImpl
Analysis. Light Classes
KT-65425
K2 IDE: Seeing a reference to the class generated by compiler plugin exposed from Java code caused NPE from light classesKT-64937
SLC: internal setters are not mangled
Apple Ecosystem
KT-63212
podInstall task fails without a proper diagnostic when xcodeproj gem is outdated
Backend. Wasm
KT-63939
Kotlin/Wasm Support lazy associated object initialisationKT-64803
K/Wasm: non-capturing lambdas are not singleton unlike same lambdas in jvmKT-64449
K2: Implement K1WasmWasiCodegenBoxTestGenerated for K2KT-64829
K/Wasm: division remainder has a wrong signKT-65009
Generate TypeScript definitions for the@JsExport
declarations in K/Wasm
Compiler
New Features
KT-63670
Implement platform specific declaration clash diagnostics across all backendsKT-62547
Introduce a language feature flag for smartcasts based on "memory" variables
Fixes
KT-63344
K2: False positive ABSTRACT_CLASS_MEMBER_NOT_IMPLEMENTEDKT-58845
K2: SAM checker can run incorrectly in presence of an expect supertypeKT-61843
K2: Missing TYPE_MISMATCH for nested array literalsKT-61798
K2 incorrectly calculates modality of property accessorsKT-65255
K2 / KJS: "IllegalArgumentException: Candidate is not successful, but system has no contradiction"KT-65341
K2: "Cannot find cached type parameter by FIR symbol" caused by not-null assertion operator inside string in throwKT-49283
Support contribution type info from a nested builder inference callKT-64077
K2: Builder inference ignores constraints from nested builder inferenceKT-49160
Couldn't infer a type argument through several builder inference calls broken by a local classKT-61310
K2: "Not enough information to infer type variable R" for transformLatestKT-63733
Builder-style type inference can't resolve to extension overloads when they're more applicable than member onesKT-57707
K1: inconsistent TYPE_MISMATCH in builder inferenceKT-55057
Builder inference changes behaviour sporadically based on BI annotation on unrelated callKT-60663
Builder inference does not work inside a nested unrelated builder inference lambdaKT-53639
TYPE_MISMATCH: compiler can't infer the list's type when usingbuildList {}
builder orCollection#isNotEmpty
KT-60291
K2: "IllegalStateException: Cannot serialize error type: ERROR CLASS: Cannot infer argument for type parameter T" during FIR serializationKT-65033
K2: Fir2LazyIr: Lazy type aliases not supportedKT-57709
Inconsistent extension function call resolution in builder inferenceKT-53740
Builder inference with multiple lambdas leads to unsound typeKT-60877
Builder inference from the null literal results in Nothing instead of Nothing? for producing positions of the postponed type variableKT-53553
Builder inference: inconsistent types in different lambda scopesKT-54400
K2: builder inference does not work with assignments of literals to member propertiesKT-53109
CompilationErrorException generateUnboundSymbolsAsDependencies with builder inference and lambdasKT-52757
Type inference for builders fails if inferred from a functionKT-63840
Builder inference fails on calls to identity-shaped functions with postponed type variables inside select-constructionsKT-64276
[K/N][K2] K2 behaviorial difference with inconsistent inheritance of ObjCNameKT-59782
K2: Forbid local delegated properties with private accessors in public inline functionsKT-65482
K2: NoSuchFieldError due to using unboxed typeKT-63208
K2: Implement deprecation cycle and fix missing errors for error-level nullable arguments of warning-level Java typesKT-64891
K2: consider supporting/forbidding foo.(bar)() syntaxKT-62134
K2: handle non-simple types during FirStatusResolver.isPrivateToThis checkKT-65290
K2: No override for FUN DEFAULT_PROPERTY_ACCESSORKT-65111
K2: Java star imports don't work in KJK interdependenciesKT-59012
K2: Support inferring types based on self upper boundsKT-65373
K2: there is a crash in KJK hierarchy with an extension member pro...
Kotlin 2.0.0-Beta3
Changelog
Analysis. API
Fixes
KT-62895
K2 IDE. FP'when' expression must be exhaustive
with sealed interface from libraryKT-64805
Analysis API: introduce common entry point for multi-file test casesKT-64714
K2: Analysis API: CollectionsKt.map doesn't resolves from Java in kotlin repoKT-64647
K2: Allow to calculate decompiled inheritors for sealed classes in testsKT-64595
AA: stackoverflow while simplifying a type with a recursive type parameterKT-64825
Analysis API. Cannot compute containing PSI for unknown source kind 'org.jetbrains.kotlin.KtFakeSourceElementKind$DefaultAccessor' exception on getContainingSymbol call for default setter parameterKT-64080
K2: Analysis API: On-air resolve does not trigger resolution of delegated super call argumentsKT-64243
K2: proper lazy resolution for fake overridesKT-62891
K2 IDE. FP [EXPOSED_FUNCTION_RETURN_TYPE] on overriding library method which returns protected typeKT-61890
Analysis API: Migrate KtFirScopeProvider to ContextCollector instead of onAirResolveKT-64197
K2: Code fragments are only supported in JVMKT-64604
K2: IDE K2: "Modules are inconsistent during performance tests"KT-62357
K2 IDE. False positive on generated component methods and false negative on getter of@JvmRecord
classes in JavaKT-62892
K2 IDE. Java outer class from other module is not resolved when nested class is accessed with fq name in a type positionKT-62888
K2 IDE. IDE infers reference toKMutableProperty
as reference to justKProperty
KT-64584
K2: StubBasedFirDeserializedSymbolProvider: support deserialization of delegated declarationsKT-60324
K2 IDE: "NoSuchElementException: List is empty at JavaOverrideChecker#buildErasure"KT-62896
K2 IDE. FP ABSTRACT_MEMBER_NOT_IMPLEMENTED on inheriting class from library which implements interface by delegationKT-62947
Analysis API: Error while resolving FirPropertyImplKT-64468
Analysis API: Implement mixed multi-module tests which support different kinds ofKtModule
sKT-63547
K2 IDE. False Positive AMBIGUOUS_ANNOTATION_ARGUMENTKT-62832
K2: ClassCastException: FirDeclarationStatusImpl cannot be cast to FirResolvedDeclarationStatusKT-64205
Analysis API: Do not import non-top-level callables by defaultKT-63056
K2: Cannot mutate an immutable ImplicitReceiverValue on FirCodeFragment analysisKT-64108
K2: KtFirSymbolDeclarationOverridesProvider shouldn't provide fake overridesKT-63752
K2: java.lang.StackOverflowError FirFieldSymbol.getHasInitializerKT-63718
Analysis API: Stub-based dependency symbol providers of library source sessions compute the wrong package name setsKT-64186
Analysis API: ContextCollector provides incorrect scopes for anonymous objectsKT-63979
K2 IDE: presentation of types in completion is too verboseKT-63681
K2: LL FIR: Improve isResolved check coverage of after lazy resolution
Analysis. Light Classes
KT-63087
K2 IDE: in .java source reference to JvmName names on unsigned type / value class are unresolvedKT-64605
K2 IDE: usage of@Repeatable
annotation in Java: false positive "Duplicate annotation"KT-64795
SLC: distinguish last v.s. non-lastvararg
value parameter type during binary resolutionKT-61605
K2 IDE: Light elements do not obey platform contractsKT-57536
SLC: no need to populate members withexpect
modifierKT-63949
K2 IDE. Analyze hang on@Autowired
constructor analysisKT-64320
Decouple kotlin psi from java PSIKT-64282
Decouple KotlinIconProviderService from java PSI
Apple Ecosystem
KT-63821
Copy framework to BUILT_PRODUCTS_DIR in the embedAndSign task
Backend. Wasm
KT-58852
WASM: two methods with different varargs: Class korlibs.template.dynamic.DynamicShape has 2 methods with the same signature [register(kotlin.Array)
Compiler
New Features
KT-4113
Smart casts for properties to not-null functional types atinvoke
calls
Fixes
KT-64261
K2 / WASM: Extension function with star projection throws "RuntimeError: unreachable"KT-64877
K2: PCLA doesn't allow infer types from value parameter having TV typeKT-63932
K2/Native codegen test failures around builder inferenceKT-64222
K2: "return type is not a subtype of the return type of the overridden member"KT-57094
K1: wrong type inferred for an instance of a local class inside a generic propertyKT-62069
K2: ASSIGNMENT_TYPE_MISMATCH is reported in addition to NO_ELSE_IN_WHENKT-62776
FirLazyResolveContractViolationException: "lazyResolveToPhase(STATUS) cannot be called from a transformer with a phase TYPES" on Java annotation usageKT-60056
K2: Introduced UNRESOLVED_REFERENCEKT-59791
K2: Implement partially constrained lambda analysisKT-42020
Psi2ir: IllegalStateException: "IrSimpleFunctionPublicSymbolImpl for public [...] is already bound" on generic function whose substitution leads to IdSignature clashKT-64771
Investigate subtle FIR_DUMP difference for reversed order analysisKT-62584
K2: different signature in subclass of local class declared in extension value getterKT-64615
Inconsistent error messages for platform type nullability assertionsKT-59938
K2: Disappeared AMBIGUOUS_ACTUALSKT-64501
K2: False-positive WRONG_INVOCATION_KIND when using default argumentsKT-64640
Prevent mutating SequenceCollection methods from JDK 21 be available on read-only collectionsKT-63644
K2: Create special IR symbols for fake-overrides in fir2ir in mode with IR f/o generatorKT-62476
K2: Enable building fake overrides by ir on non-JVM targetsKT-63638
K2: Compiler crashes with "Inline class types should have the same representation"KT-36220
NI: false positive NON_APPLICABLE_CALL_FOR_BUILDER_INFERENCE if one use cannot resolveKT-64121
K2: Actual modifier is missed onoverride fun toString()
fro value class in nativeKT-63703
K2: Eliminate call to Candidate.usesSAM and samResolver.getFunctionTypeForPossibleSamType in AbstractConeCallConflictResolver.toTypeWithConversionKT-64435
K2: FIR2IR: Source offsets for data class members are inconsistent with PSI2IRKT-64090
K2: false-positive new inference error on invoking from another module a generic function on Java list type with wildcard type argument bounded by raw-typed Java inner classKT-64044
K2: Java mapped method should have a source from Java method, not from mapped Kotlin source classKT-46674
ClassCastException with smartcast ifplus
opera...