Changelog
Analysis. API
Fixes
KT-62895K2 IDE. FP'when' expression must be exhaustivewith sealed interface from libraryKT-64805Analysis API: introduce common entry point for multi-file test casesKT-64714K2: Analysis API: CollectionsKt.map doesn't resolves from Java in kotlin repoKT-64647K2: Allow to calculate decompiled inheritors for sealed classes in testsKT-64595AA: stackoverflow while simplifying a type with a recursive type parameterKT-64825Analysis API. Cannot compute containing PSI for unknown source kind 'org.jetbrains.kotlin.KtFakeSourceElementKind$DefaultAccessor' exception on getContainingSymbol call for default setter parameterKT-64080K2: Analysis API: On-air resolve does not trigger resolution of delegated super call argumentsKT-64243K2: proper lazy resolution for fake overridesKT-62891K2 IDE. FP [EXPOSED_FUNCTION_RETURN_TYPE] on overriding library method which returns protected typeKT-61890Analysis API: Migrate KtFirScopeProvider to ContextCollector instead of onAirResolveKT-64197K2: Code fragments are only supported in JVMKT-64604K2: IDE K2: "Modules are inconsistent during performance tests"KT-62357K2 IDE. False positive on generated component methods and false negative on getter of@JvmRecordclasses in JavaKT-62892K2 IDE. Java outer class from other module is not resolved when nested class is accessed with fq name in a type positionKT-62888K2 IDE. IDE infers reference toKMutablePropertyas reference to justKPropertyKT-64584K2: StubBasedFirDeserializedSymbolProvider: support deserialization of delegated declarationsKT-60324K2 IDE: "NoSuchElementException: List is empty at JavaOverrideChecker#buildErasure"KT-62896K2 IDE. FP ABSTRACT_MEMBER_NOT_IMPLEMENTED on inheriting class from library which implements interface by delegationKT-62947Analysis API: Error while resolving FirPropertyImplKT-64468Analysis API: Implement mixed multi-module tests which support different kinds ofKtModulesKT-63547K2 IDE. False Positive AMBIGUOUS_ANNOTATION_ARGUMENTKT-62832K2: ClassCastException: FirDeclarationStatusImpl cannot be cast to FirResolvedDeclarationStatusKT-64205Analysis API: Do not import non-top-level callables by defaultKT-63056K2: Cannot mutate an immutable ImplicitReceiverValue on FirCodeFragment analysisKT-64108K2: KtFirSymbolDeclarationOverridesProvider shouldn't provide fake overridesKT-63752K2: java.lang.StackOverflowError FirFieldSymbol.getHasInitializerKT-63718Analysis API: Stub-based dependency symbol providers of library source sessions compute the wrong package name setsKT-64186Analysis API: ContextCollector provides incorrect scopes for anonymous objectsKT-63979K2 IDE: presentation of types in completion is too verboseKT-63681K2: LL FIR: Improve isResolved check coverage of after lazy resolution
Analysis. Light Classes
KT-63087K2 IDE: in .java source reference to JvmName names on unsigned type / value class are unresolvedKT-64605K2 IDE: usage of@Repeatableannotation in Java: false positive "Duplicate annotation"KT-64795SLC: distinguish last v.s. non-lastvarargvalue parameter type during binary resolutionKT-61605K2 IDE: Light elements do not obey platform contractsKT-57536SLC: no need to populate members withexpectmodifierKT-63949K2 IDE. Analyze hang on@Autowiredconstructor analysisKT-64320Decouple kotlin psi from java PSIKT-64282Decouple KotlinIconProviderService from java PSI
Apple Ecosystem
KT-63821Copy framework to BUILT_PRODUCTS_DIR in the embedAndSign task
Backend. Wasm
KT-58852WASM: two methods with different varargs: Class korlibs.template.dynamic.DynamicShape has 2 methods with the same signature [register(kotlin.Array)
Compiler
New Features
KT-4113Smart casts for properties to not-null functional types atinvokecalls
Fixes
KT-64261K2 / WASM: Extension function with star projection throws "RuntimeError: unreachable"KT-64877K2: PCLA doesn't allow infer types from value parameter having TV typeKT-63932K2/Native codegen test failures around builder inferenceKT-64222K2: "return type is not a subtype of the return type of the overridden member"KT-57094K1: wrong type inferred for an instance of a local class inside a generic propertyKT-62069K2: ASSIGNMENT_TYPE_MISMATCH is reported in addition to NO_ELSE_IN_WHENKT-62776FirLazyResolveContractViolationException: "lazyResolveToPhase(STATUS) cannot be called from a transformer with a phase TYPES" on Java annotation usageKT-60056K2: Introduced UNRESOLVED_REFERENCEKT-59791K2: Implement partially constrained lambda analysisKT-42020Psi2ir: IllegalStateException: "IrSimpleFunctionPublicSymbolImpl for public [...] is already bound" on generic function whose substitution leads to IdSignature clashKT-64771Investigate subtle FIR_DUMP difference for reversed order analysisKT-62584K2: different signature in subclass of local class declared in extension value getterKT-64615Inconsistent error messages for platform type nullability assertionsKT-59938K2: Disappeared AMBIGUOUS_ACTUALSKT-64501K2: False-positive WRONG_INVOCATION_KIND when using default argumentsKT-64640Prevent mutating SequenceCollection methods from JDK 21 be available on read-only collectionsKT-63644K2: Create special IR symbols for fake-overrides in fir2ir in mode with IR f/o generatorKT-62476K2: Enable building fake overrides by ir on non-JVM targetsKT-63638K2: Compiler crashes with "Inline class types should have the same representation"KT-36220NI: false positive NON_APPLICABLE_CALL_FOR_BUILDER_INFERENCE if one use cannot resolveKT-64121K2: Actual modifier is missed onoverride fun toString()fro value class in nativeKT-63703K2: Eliminate call to Candidate.usesSAM and samResolver.getFunctionTypeForPossibleSamType in AbstractConeCallConflictResolver.toTypeWithConversionKT-64435K2: FIR2IR: Source offsets for data class members are inconsistent with PSI2IRKT-64090K2: 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-64044K2: Java mapped method should have a source from Java method, not from mapped Kotlin source classKT-46674ClassCastException with smartcast ifplusoperator returns a different typeKT-59369K2: Missing BUILDER_INFERENCE_STUB_RECEIVERKT-64644K2: Compiler crash in FirTypeParameterBoundsCheckerKT-64312K2: FirPropertySymbol.hasBackingField() always returns true for properties from other modulesKT-64420K2: Wrong module descriptor for builtin classesKT-64127K2: incorrect resolution of inherited members on Java classes inheriting classes from different packages in the presence of identically named classes in the same packagesKT-63446IrFakeOverrideBuilder: AbstractMethodError due to missing bridge for generic method in a Java superclassKT-63441IrFakeOverrideBuilder: "accidental override" when implementing a Java function taking an array parameterKT-63867K2: Smartcast is allowed inside changing lambda with cyclesKT-63414K2 / Contracts: false positive "Result has wrong invocation kind" when invoking a function returning a value with contract InvocationKind.EXACTLY_ONCE and try/finallyKT-63777K2: Smartcast is allowed inside changing lambda with boundsKT-64059K2: CYCLIC_INHERITANCE_HIERARCHY while using nested annotation in an outer class declarationKT-63528K2: Missing UNNECESSARY_SAFE_CALL for warning level annotated java declarationsKT-64607K2: extension functions on UInt and Number lead to JVM ClassCastExceptionKT-62816K2: Annotation use site targets printing could be improved in diagnostics' messagesKT-62815K2: FIR renderings leak through some diagnostics' messageKT-35289Confusing warning message "Duplicate label in when"KT-49084Contracts: error message is unclearKT-63228K2: Upper bound violation diagnostic renders compiler internals about SourceAttributeKT-62386K2: Proofread quotes in diagnostic messagesKT-64081K2: Incorrect smartcast candidate calculation in MemberScopeTowerLevelKT-63994K2: Investigate K2 failures in IntelliJ-Rust pluginKT-58767Inheritance opt-in enforcement via@SubclassOptInRequiredcan be avoided with type aliasesKT-63941K2: "IllegalStateException: Unsupported compile-time value STRING_CONCATENATION" caused by class reference in string expression as annotation parameterKT-59818K2: Explore the TODO about suspend functions overridden in Java in FirHelpersKT-63233K2 : false negativeClass is not abstract and does not implement abstract memberwith abstract suspend functionKT-63379K2. Argument type mismatch on creating functional interface instance with function literal as an argument withintype projectionKT-64308K2: prefer call with Unit conversion at lower level to one without Unit conversion at upper levelKT-64307K2: prefer function with default arguments at lower level to one without them at upper level during callable reference resolveKT-64306K2: prefer SAM at lower level to a functional type at upper levelKT-63827K2: Array += desugaring doesn't have originKT-64341Kotlin/JVM: Missing line number generation for intrinsic comparisonsKT-64238Add proper documentation to theIdeCodegenSettingsclassKT-63667K2/KMP: exception when expect property matched to java fieldKT-63563K2: False negative RETURN_TYPE_MISMATCH with empty returnKT-62525K2: IllegalStateException: Can't find KotlinType in IrErrorType: IrErrorType(null)KT-57427Fix inconsistencies in name manglers that use different declaration representationsKT-57755K2/JVM: Fix computing a "signature" mangled name for themainfunctionKT-63645K2: Replace special f/o symbols with normal ones after actualizationKT-63076K2: change in behavior for synthetic properties in Kotlin-Java hierarchyKT-63723Frontend manglers improperly handle error typeKT-63738K2: Some declarations are missing in the hierarchy of overridden symbolsKT-62242K2: Uniformly treat enum entries as anonymous objectsKT-62281K2: build DuckDuckGo Android user project and pass it to CIKT-60266K2: origin is not set for FOR_LOOP_ITERATORKT-59875K2: Disappeared UNRESOLVED_REFERENCE_WRONG_RECEIVERKT-62715K2: Missing WASM_IMPORT_EXPORT_UNSUPPORTED_PARAMETER_TYPEKT-62723K2: Missing WASM_IMPORT_ON_NON_EXTERNAL_DECLARATIONKT-62722K2: Missing NESTED_WASM_IMPORTKT-62721K2: Missing WASM_EXPORT_ON_EXTERNAL_DECLARATIONKT-62720K2: Missing JS_AND_WASM_EXPORTS_ON_SAME_DECLARATIONKT-62719K2: Missing NESTED_WASM_EXPORTKT-62718K2: Missing WASM_IMPORT_EXPORT_UNSUPPORTED_RETURN_TYPEKT-62717K2: Missing WASM_IMPORT_EXPORT_PARAMETER_DEFAULT_VALUEKT-62716K2: Missing WASM_IMPORT_EXPORT_VARARG_PARAMETERKT-60225K2: compiler FIR symbol resolution crash on a call to an extension function whose receiver contains a type parameter with a recursive upper boundKT-63530K2: Disable passing data flow info from in-place lambdasKT-60958K2: smart cast does not work with definite return from if blockKT-60090K2: Introduced DEPRECATED_PARCELERKT-59949K2: Disappeared DEPRECATED_PARCELERKT-61768Wrong bytecode index in LineNumberTable when there is an incremental operationKT-64045K2: "Expect declaration * is incompatible with actual" when function parameter names are differentKT-62018K2: prohibit suspend-marked anonymous function declarations in statement positionsKT-63973K2: "NoSuchElementException: Array is empty" with vararg used within tail recursive functionKT-63612K2: Class is not abstract and does not implement abstract memberKT-61792KMP: Backend error on@Deprecatedusage with DeprecationLevel.HIDDEN in K2KT-63709K2: Argument smartcasting impacting receiver and call resolution for implicit invokeKT-57788Fix computing mangled names of types with@EnhancedNullabilityfrom IR-based declaration descriptorsKT-63249K2: change in annotation resolve when ambiguousKT-63514ISE “Inline class types should have the same representation: [I != I” during compilation on submitting UIntArray to varargKT-62553K2: AddtopLevelClassifierPackageNamesto symbol name providersKT-64148K2: class cast exception org.jetbrains.kotlin.fir.types.ConeStarProjectionKT-63665K2: "NullPointerException" caused by class with the companion object and extra curly braceKT-59715K2: Check behaviour of property + operator in operator positionKT-62347Prohibit using property+invoke convention for delegated propertiesKT-59421K2: Missing CONTEXT_RECEIVERS_WITH_BACKING_FIELDKT-59903K2: Disappeared DELEGATE_SPECIAL_FUNCTION_NONE_APPLICABLEKT-62926K2: IR has missing receivers during expect-actual matchingKT-62565K2 cannot infer type parameters in case of expected functional typeKT-63328K2: Top-level properties in scripts can be used while uninitializedKT-59683K2: Add control flow graph to FirScriptKT-63524K2: "Not enough information to infer type argument"KT-63835K2: metadata compilation with constants is falling for NativeKT-60251K2: delegated method are delegating to different methods in hierarchy compared to K1KT-63695JVM: Don't use plugin extensions when compiling code fragmentKT-63574K2: "IllegalStateException: IrFieldPublicSymbolImpl for java.nio/ByteOrder.LITTLE_ENDIAN"KT-60504K2: difference between LL FIR and FIR in enhanced return type with annotationKT-64147K2: Generate FIR diagnostics with explicit typesKT-63042K2: proper processing of propagated annotationsKT-59368K2: Missing SUBTYPING_BETWEEN_CONTEXT_RECEIVERSKT-64083K2: "KotlinIllegalArgumentExceptionWithAttachments: Unexpected returnTypeRef. Expected is FirResolvedTypeRef, but was FirJavaTypeRef"KT-37308No smart cast when the null check is performed on a child property through a function with a contractKT-59894K2: Disappeared ANNOTATION_ARGUMENT_MUST_BE_CONSTKT-63329K2: difference in SAM-conversion casts generationKT-64062K2 IDE. NPE on typing nullable parameter in returnKT-58579K2: false-positive new inference error on invoking a generic function on Java wildcard type bounded by raw-typed Java inner classKT-64031K2: Revise naming in FirBuilderInferenceSessionKT-50453Improve builder inference diagnostics with type mismatch due to chosen inapplicable overloadKT-56949K2: Builder inference violates upper boundKT-63648K2: values of postponed type variable don't introduce type constraints in extension receiver positions during builder-style type inferenceKT-64028K2: Investigate questionable condition in FirBuilderInfernceSessionKT-63848ReflectiveAccessLowering does not count arguments of super-callsKT-61920K2: False negative CONST_VAL_WITH_NON_CONST_INITIALIZER when initializer is Java fieldKT-63508K2: "IllegalArgumentException: Not FirResolvedTypeRef (String) in storeResult" caused by@DeprecatedJava function and typoKT-63522K2: wrong context for delegated field typeKT-53308TYPE_MISMATCH: Contracts on boolean expression has no effect on referential equality tonullKT-51160Type mismatch with contracts on narrowing sealed hierarchy fail to smart castKT-49696Smart cast to non-null with inline non-modifying closures sometimes doesn't workKT-46586SMARTCAST_IMPOSSIBLE when assigning value inside lambda instead of if expressionKT-41728False positive no smart cast with unreachable code after return in if expressionKT-22904Incorrect bytecode generated for withIndex iteration on Array
IR. Actualizer
KT-58861K2: Improve the new pipeline of FIR2IR conversion, IR actualization and fake-override generationKT-63347K2: Fix overridden symbols inside LazyDeclarationsKT-62535K2: FakeOverrideRebuilder can't handle f/o without overridden symbols
JavaScript
KT-61929KJS: "IllegalStateException: No dispatch receiver parameter for FUN LOCAL_FUNCTION_FOR_LAMBDA" caused byrunfunction in init blockKT-64366KJS / K2: Exported declaration uses non-exportable return type: 'kotlin.?'KT-64426K2: Implement JsIrLineNumberTestGenerated for K2KT-64422K2: Implement IrJsSteppingTestGenerated for K2KT-64364K2 / KJS:@JSExportsgenerates clashing declarations for companion objects that extends its own classKT-63038Compilation of suspend functions into ES2015 generators
Klibs
KT-64085Different klib signatures for K1/K2 for overridden properties assigned in init blockKT-64395API for ABI: Add a check for the file's existence to KLIB ABI ReaderKT-63573K2: Dependency problems with dependencies with same artifact idKT-64082Different klib signatures in K1/K2 for the same locally used constant declarationKT-63931[K/N] Relative path to klib option of cinterop tool doesn't workKT-60390KLIBs: Wrong IrSymbol is used for deserializedexpectproperty's backing field & accessors
Libraries
KT-61969Migrate kotlin-test to the current Kotlin Multiplatform PluginKT-64361Optimization opportunity in Int.signKT-63157Make sure that all deprecation levels are raised to ERROR for declarations intended for removal from kotlinx-metadataKT-64230Prohibit writing versions of metadata that are too high
Native
KT-61695[K/N] Empty list error in FakeOverridesActualizer with K2KT-64508IndexOutOfBoundsException in Konan StaticInitializersOptimization
Native. C and ObjC Import
KT-63049NPE in BackendChecker.visitDelegatingConstructorCall compiling ObjC-interop classKT-59597[K\N] Usage of instancetype in block return type crashes
Native. ObjC Export
KT-62091KMP for iOS framework with private api : __NSCFBooleanKT-64076ObjCExport: Do not retain descriptors in stubsKT-64168ObjCExport: Split header generator module into K1 and Analysis ApiKT-64227ObjCExport: Extract Header Generation to base module
Native. Runtime. Memory
KT-62689Native: generate signposts for GC performance debugging
Native. Testing
KT-64256IR_DUMP directive doesn't enforce FIR_IDENTICAL when it is possibleKT-62157Native: Migrate FileCheck tests to new native test infra
Tools. CLI
KT-64013CLI REPL: "com.sun.jna.LastErrorException: [14] Bad address" on invoking kotlinc from CLI on ARM Mac
Tools. Compiler Plugin API
KT-64444K2: IrGeneratedDeclarationsRegistrar.addMetadataVisibleAnnotationsToElement doesn't work for declarations in common module
Tools. Compiler Plugins
KT-33020Support stripping debug information in the jvm-abi-gen pluginKT-64707K2: Parcelize ignores@TypeParcelerset for typealias
Tools. Compiler plugins. Serialization
KT-64447K2: Implement Serialization...IrBoxTestGenerated for K2KT-64124Different klib signatures in K1/K2 for a serializable class
Tools. Gradle
KT-64653Add Kotlin DslMarker into Gradle plugin DSLKT-64251KGP: Cannot re-use tooling model cache with Project Isolation due to "~/.gradle/kotlin-profile" changingKT-58768Support configuration cache and project isolation for FUS statisticsKT-64379Removekotlin.useK2gradle propertyKT-62527Gradle: get rid of theProject.buildDirusagesKT-55322Kotlin daemon: Cannot perform operation, requested state: Alive > actual: LastSession
Tools. Gradle. Cocoapods
KT-57650Gradle Cocoapods: use pod install --repo-update instead of pod install
Tools. Gradle. JS
KT-64561K/JS tests are not executed after upgrade to 1.9.22KT-63435KJS: Get rid of deprecated outputFileProperty of Kotlin2JsCompile
Tools. Gradle. Multiplatform
KT-56440TCS: Gradle Sync: Add API to populate extras only during syncKT-63226KGP Multiplatform Ide Dependency Resolution: Use gradle variants instead/in addition of ArtifactResolutionQuery
Tools. Gradle. Native
KT-62745iOS application build is failing if script sandboxing option is enabled in XcodeKT-62800CInteropProcess should not require .def file to existKT-62795CInteropProcess task resolves cinterop def file eagerly, breaking Gradle task dependencies
Tools. Incremental Compile
KT-63837Implement baseline fix for common sources getting access to platform declarationsKT-64513Simplify adding configuration properties to incremental compilationKT-21534IC doesn't recompile file with potential SAM-adapter usageKT-63839Measure impact of rebuilding common sources, using nightly IC benchmarksKT-64228K2: After switching to LV20 branch incremental tests are not running on PSI anymoreKT-46743Incremental compilation doesn't process usages of Java property in Kotlin code if getter is removedKT-60522Incremental compilation doesn't process usages of Java property in Kotlin code if return type of getter changes
Tools. JPS
KT-55393JPS: Java synthetic properties incremental compilation is broken
Tools. Kapt
KT-64719K2 KAPT Stub genertaion doesn't fail on files with syntax errorsKT-64680Kapt: remove the flag to enable old JVM backendKT-64639KAPT+JVM_IR: erased error types in JvmStatic and JvmOverloadsKT-64389K2 KAPT generates invalid code for multiple generic constraintsKT-61776K2: KAPT tasks fail with parallel gradleKT-64021Kapt3 + Kapt4. NullPointerException: processingEnv must not be nullKT-64303K2 KAPT: Kapt doesn't dispose resources allocated by standalone analysis APIKT-64301K2 KAPT: Kapt doesn't report invalid enum value names to logKT-64297K2 KAPT: Deprecated members are not marked with@java.lang.Deprecated
Tools. REPL
KT-18355REPL doesn't quit on the first line after pressing Ctrl+D or typing :quit