Kotlin 2.0.20-Beta2
Pre-release
Pre-release
KotlinBuild
released this
10 Jul 10:00
·
162 commits
to 2.0.20
since this release
Changelog
Analysis. API
Fixes
KT-65417
K2 IDE: KTOR false positive expect-actual matching error on enum class because of implicit clone() in non-JVM source setsKT-68882
Analysis API: RefactorKaSymbol
sKT-68689
LL API: support analysis from builtins moduleKT-67775
Analysis API: expose only interfaces/abstract classes for the user surfaceKT-68009
K2: lowering transformers of Compose compiler plugin access AbstractFir2IrLazyFunction modality, which results in null point exceptionKT-68918
collectCallCandidates works incorrectly for parenthesis invokeKT-68462
Analysis API: Integrateproject-structure
module intoanalysis-api
andanalysis-api-platform-interface
KT-69131
AA: "provideDelegate" operator is not resolved from the delegation reference in FIR implementationKT-69055
Analysis API: StabilizeKaScope
sKT-68959
Introduce KaSeverityKT-68846
Mark KaFirReference and all implementations with internal modifierKT-68845
Move KaSymbolBasedReference to resolution packageKT-68844
Move KaTypeProjection to types packageKT-65849
K2: Rename 'high-level-api' family of JARs to 'analysis-api'KT-62540
Remove uses of TypeInfo.fromString and TypeInfo.createTypeText from Kotlin pluginKT-68155
Analysis API: Add PSI validity check toanalyze
KT-62936
Analysis API: NativeForwardDeclarationsSymbolProvider is not supported for Kotlin/Native
Analysis. Light Classes
KT-68261
SLC: Constructors of sealed classes should be privateKT-68696
DropDecompiledPsiDeclarationProvider
-related stuffKT-68404
SLC: wrong binary resolution to declaration with@JvmName
Backend. Native. Debug
KT-67567
Native: after updating to LLVM 16 lldb hangs when smooth stepping
Backend. Wasm
KT-68828
Wasm test failure. expect-actual. private constructor in expect
Compiler
New Features
KT-58310
Consider non-functional type constraints for type variable which is an expected type for lambda argumentKT-57872
Improve "Public-API inline function cannot access non-public-API" check
Fixes
KT-65546
K2. implement extended checker for unused anonymous parameter in lambdaKT-60445
K2/Java: investigate possible symbol clash while enhancing Java class type parameter boundsKT-68358
@EnhancedNullability
is missing on value parameter type after inheritance by delegation with strict JSpecify enabledKT-67791
False negative "Synchronizing by Meters is forbidden" with inline value classesKT-69495
k2: inconsistent output of unsigned number in string templatesKT-67693
Implement checkers for K1 compiler which will check the usage of K2 new features and report that they are not supported in K1 compilerKT-44139
Don't report overload resolution ambiguities if arguments contain an error typeKT-69282
K2: equality of unsigned types with nullability works incorrectlyKT-69619
K2. JAVA_TYPE_MISMATCH when Kotlin out generic type used in JavaKT-68996
K2: "Not enough information to infer type argument" caused by typealias annotation with fixed generic argumentKT-69563
trying to call.source
onFirPackageFragmentDescriptor
results in exceptionKT-69611
Internal annotation FlexibleArrayElementVariance is written to output jarKT-69463
K2: false negative SUPER_CALL_WITH_DEFAULT_PARAMETERS with expect/actual declarationsKT-68556
K2: false negative PROPERTY_WITH_NO_TYPE_NO_INITIALIZER on uninitialized property without typeKT-68997
K2: "No accessor found" for an inline value class when query the value of a delegated class by reflectionKT-68724
K2: "ABSTRACT_MEMBER_NOT_IMPLEMENTED" caused by open modifier on interfaceKT-68667
K2: Compiler hangs on mapNotNull and elvis inside lambdaKT-68747
K2: Long compilation time because of constraint solving when using typealias in different modulesKT-68940
K2: "IllegalArgumentException: All variables should be fixed to something"KT-69182
K2: OptIn on enum companion blocks enum constantsKT-69191
K2: "Unresolved reference" caused by nested data objectsKT-68797
K2 / Native: "java.lang.IllegalStateException: FIELD" caused by enabled cachingKT-69569
Wrong paths when one type has multiple annotated argumentsKT-63871
K2: different value ofisNotDefault
flag for property inherited from delegateKT-63828
K2: Missingsignature
metadata for accessors of properties inherited from delegateKT-68669
K2: Generate inherited delegated members after actualizationKT-69402
FirSupertypeResolverVisitor: ConcurrentModificationExceptionKT-68449
K2: "when" expression returns UnitKT-67072
K2: inconsistent stability of open vals on receivers of final typeKT-68570
K2: "Unresolved reference" in call with lambda argument and nested lambda argumentKT-69476
False negative NO_ELSE_IN_WHEN on when over intersection type with expect enum/sealed classKT-67069
K2: Delegated member calls interface method instead of fake overrideKT-63864
K2: Missing abbreviated type in metadataKT-69421
K2: Resolve changed from delegated function to java default functionKT-69392
K2: "UNSAFE_CALL": when with some variable subjects does not smartcast the variableKT-69159
K2: KotlinNothingValueException in ExposedKT-69053
K2: Unsupported intersection overrides for fieldsKT-69227
K2: "Argument type mismatch" caused by generic typealias and upper boundKT-31371
NOT_YET_SUPPORTED_IN_INLINE: incorrect error message for local inline functionKT-49473
PROTECTED_CALL_FROM_PUBLIC_INLINE_ERROR: specialize error message for 'inline' propertyKT-49474
NON_PUBLIC_CALL_FROM_PUBLIC_INLINE: specialize error message for 'inline' propertyKT-49503
SUPER_CALL_FROM_PUBLIC_INLINE_ERROR: specialize error message for 'inline' propertyKT-11302
On inapplicable '@JvmStatic
' annotation, highlight only the annotation, not the function signatureKT-59510
K2: do not render annotations in the deprecation diagnosticKT-68532
"This code uses error suppression for 'INAPPLICABLE_JVM_NAME'. While it might compile and work, the compiler behavior is UNSPECIFIED and WON'T BE PRESERVED"KT-68859
K2: unable to suppress only "JAVA_MODULE_DOES_NOT_EXPORT_PACKAGE"KT-68623
K2: "Only safe or null-asserted calls are allowed" on safe callKT-68364
JVM: ISE "Bad exception handler end" on a non-local break/continue inside try with finallyKT-68469
[K2] MISSING_DEPENDENCY_CLASS caused by redundant@file
:JvmNameKT-68999
K2: Unify the style of FIR generator with IR and SIR tree-generatorsKT-66061
Kotlin/Native - building shared module for iOS - Argument list too longKT-67804
removeFirst and removeLast return type with Java 21KT-49420
Suspicious behaviour of frontend in case of DefinitelyNotNull type overloadKT-59752
K2: "Conflicting overloads" if function with same signature added to different contextsKT-68618
K1: Unresolved reference for qualified this in implicit typeKT-25341
NOT_YET_SUPPORTED_IN_INLINE reported over anonymous object borderKT-69044
Destructuring declaration shouldn't be possible in declaration in whenKT-69028
K2:FirJvmActualizingBuiltinSymbolProvider
returnsnull
on builtins declarations if common source-set is not presentedKT-67119
Migration warning from context receivers to context parametersKT-15704
Rethink usage of term "type annotation" in error messagesKT-68970
K2. Argument type mismatch caused by out projection in inferred type from if - elseKT-68727
K2: "Null argument in ExpressionCodegen for parameter VALUE_PARAMETER" caused by an enum class with default parameter in a different moduleKT-68626
K2: "Conflicting Overloads" for function if inherited from generic typeKT-68800
K2: DeleteConeAttributes.plus
methodKT-59389
K2: Missing AMBIGUOUS_LABELKT-68803
K2: Smart cast fails with "Unresolved reference" when@Suppress
("UNCHECKED_CAST") used in statementKT-68968
K2: Missing ILLEGAL_SUSPEND_FUNCTION_CALL diagnostic in initialization code of a local class inside suspend functionKT-68489
K2: WRONG_ANNOTATION_TARGET with Java and Kotlin@Target
annotation positionsKT-68517
"IrSimpleFunctionSymbolImpl is unbound" for actual class containing non-actual functionsKT-59678
K2: InvestigateConeKotlinType.unCapture()
KT-64193
K2: No smartcast with two boolean expressions in a rowKT-69058
K2: Java-defined property annotations not persistedKT-69027
K2: InitializeFirStdlibBuiltinSyntheticFunctionInterfaceProvider
in library sessionKT-62818
K2: improve VAR_OVERRIDDEN_BY_VAL diagnostic messageKT-68214
Rename TypeApproximatorConfiguration properties for clarityKT-64515
K2 IDE: [NEW_INFERENCE_ERROR] in a build.gradle.kts script while applying "jvm-test-suite" plugin and then configuring targets for test suitesKT-68093
Implement deprecation of smartcasts on class-delegated propertiesKT-67270
Native: report more performance metrics from the compilerKT-68621
DATA_CLASS_INVISIBLE_COPY_USAGE false negative for inline funKT-68575
K2:@ParameterName
annotation is not erased when inferring the type ofit
in lambdasKT-69000
Can't render constructor of intersection typeKT-68401
K2: "IllegalAccessError: failed to access class" caused by package private super Java type, when inferencing a common super type of if or when branches on JVMKT-68806
K/Wasm RuntimeError: unreachable on Sequence::toListKT-68849
K2: "ClassCastException: cannot be cast to kotlin.jvm.functions.Function2" caused by passing lambda to SAM constructor resultsKT-68455
K2: False negative UPPER_BOUND_VIOLATED_BASED_ON_JAVA_ANNOTATIONSKT-61744
Native: -Xsave-llvm-ir-after fails to check errors from LLVMPrintModuleToFileKT-68874
Types with different captured types as type arguments are rendered incorrectlyKT-67103
Support AbbreviatedTypeAttribute for aliased types from the source codeKT-65038
K2: Type alias from indirect dependency causesMISSING_DEPENDENCY_CLASS
errorKT-63921
K2: different representation of recursive type aliasesKT-68538
KJS/K2: usingwhile
withbreak
inside inline lambdas leads to an endless cycleKT-68679
K2: "Override has incorrect nullability in its signature compared to the overridden declaration" caused by subclass of Android HashMapKT-68734
K2: enum class in KMP: Expect declarationMMKVLogLevel
is incompatible with actualMMKVLogLevel
because modality is differentKT-68820
K2: "Unresolved reference" on calling function with "contract" nameKT-68230
K2: FirMissingDependencyClassChecker: Not supported: ConeFlexibleTypeKT-68531
K2: False-negative error on assignment to enum entryKT-68571
K2: "IllegalStateException: Fake override should have at least one overridden descriptor" caused by exceptions and when statementKT-68523
K2: FileAnalysisException when using Definitely non-nullable typesKT-68339
K2: "Enum entry * is uninitialized here" caused by lazy property with enum inwhen
expressionKT-68678
K2: Drop usingFirBuiltinSymbolProvider
while compiling JVM stdlibKT-68585
Implement new rules for CFA about enum entriesKT-68110
K2: "Java type mismatch" caused by spring.NullableKT-68613
K2: False positiveCONFLICTING_PROJECTION
after fixing KT-67764KT-67764
K2: False negative: Projection problem is not reported inis
expressionKT-68542
K2: Fix referecing to@ExtensionFunctionType
if it's declared in sourceKT-68188
K2: Properly support FunctionN creation for stdlib compilationKT-67946
K2: Crash on red code:Instead use FirErrorTypeRef for ERROR CLASS: Cannot infer argument for type parameter T
KT-68617
K2: Secondary constructors in a sealed class have private visibility instead of protected in the generated IRKT-63920
K2: Private secondary sealed class constructor is private in metadata, but protected in K1KT-68207
K2: Investigate if losing ConeIntersectionType.upperBoundForApproximation during approximation leads to any issuesKT-51433
FE 1.0: implement warnings about label resolve changes
Compose compiler
New features
192e556
Strong skipping is now enabled by default842a9e8
Add support for default parameters in abstract and open@Composable
functionsb/165812010
Fixes
e207b05
Fixes group generation for if statements when nonSkippingGroupOptimization is enabledb/346821372
f64fc3a
FixesendToMarker
generation in early return from inline lambdas that caused start/end imbalanceb/346808602
d6ac8a5
Stop memoizing lambdas with captured property delegatesb/342557697
f38d5a3
Stop capturing parameter meta across crossinline boundaryb/343801379
770fe8d
Propagate annotations from inferred function types when serializingb/345261077
3c67cda
Fix memoization of captureless lambdas when K2 compiler is usedb/340582180
3281e53
Allow memoizing lambdas in composable inline functionsb/340606661
IR. Actualizer
KT-68830
Compiler crash on missing actual classKT-69024
K2: Children of expect annotation with@OptionalExpectation
should be actualizedKT-68742
Allow expect protected to Java protected actualizationKT-66436
K2. Actualizing modCount property with a field in AbstractMutableListKT-68741
Support actualization of AbstractMutableList.modCountKT-68801
Crash on access of fake override of function actualized by fake override
IR. Inlining
KT-68100
Run IR validation in the beginning and the end of the common prefixKT-69171
Introduce a temporary-X
CLI parameter that enables double-inliningKT-69006
Enable IR visibility checks after IR inliningKT-69183
IR inlining: properly handle defaults that depends on previous value parametersKT-68558
MoveInlineCallableReferenceToLambdaPhase
intoir.inline
module
IR. Tree
KT-68784
Support validating visibility of referenced declarations in IrValidatorKT-68174
Delete the IrMessageLogger interfaceKT-67082
Introduce attributes on IrElementKT-67695
ForLoopsLowering fails to handle a loop over an imprecise typed iterableKT-68716
DeepCopyIrTreeWithSymbols.visitConst
should remap const type
JavaScript
KT-66898
KJS: Reserved keywords not escaped when-Xir-generate-inline-anonymous-functions
is enabledKT-69400
Use correct type for references on local functions when transforming them into lambdaKT-68554
Legalize marker interface as parent for JSO (interface marked with@JsPlainObject
)KT-68891
@JsPlainObject
fails to compile when encountering reserved keywords as interface propertiesKT-69023
KJS / IR:globalThis
is mandatory, breaking older browsers supportKT-68641
KJS: 'export was not found' with per-file mode on case-insensitive filesystemKT-68632
K2: allow JS_NAME_CLASH suppressionKT-68620
[wasm] [js]
Default param in inner class method fails if we are referring generic extension property
Klibs
KT-66605
[KLIB] Excessive creation ofBaseKotlinLibrary
during resolving libsKT-68824
API 4 ABI: Don't show sealed class constructors
Language Design
KT-68636
Incorrect private_to_this visibility for data class with a private constructor
Libraries
KT-31880
UUID functionality to fix Java bugs as well as extend itKT-60787
Cannot ignore alpha when formatting with HexFormatKT-66129
Minor issues with HexFormatKT-57998
implement Base64.withoutPaddingKT-67511
provide equals() and hashCode() implementations for kotlinx.metadata.KmTypeKT-68240
stdlib: proper expects for internal API used in intermediate shared source setsKT-68840
atomicfu-runtime: annotate some internal functions with@PublishedApi
KT-68839
Annotatekotlin.js.VOID
property with@PublishedApi
Native
KT-69206
Native: updating to LLVM 16 breaks debugging in lldb on LinuxKT-68640
Native: updating to LLVM 16 changes behavior ofused
attribute in C/C++ codeKT-58097
Kotlin/Native: improve the error message if Xcode is not properly configured
Native. ObjC Export
KT-57496
linkReleaseFrameworkIosArm64: e: Compilation failed: An operation is not implemented
Native. Runtime. Memory
KT-68871
Native: Unexpected barriers phase during STW: weak-processing
Native. Swift Export
KT-69469
Exporting object twice causing crashKT-69251
Get rid of context receivers from ./native/.../lazyWithSessions.ktKT-68865
Move config into test-directives
Native. Testing
KT-69235
Incorrect handling of friend dependencies in Native test infraKT-67436
Native: support CLI tests
Reflection
KT-69433
KotlinReflectionInternalError on non-reified type parameter in typeOf inside an inline lambdaKT-68675
K2: KotlinReflectionInternalError on non-reified type parameter in typeOf inside a lambda
Tools. Build Tools API
KT-68555
BTA test infra: top level declarations are invisible across modules
Tools. CLI
KT-68838
OutOfMemory when compiling in CLIKT-68743
Extract common CLI arguments for all KLIB-based backendsKT-68450
CLI: errors related to module-info are reported even if there are no Kotlin source files
Tools. CLI. Native
KT-66952
Native: konanc fails when KONAN_HOME is under path with spaces
Tools. Commonizer
KT-68835
Command line length overflow on Linux/Windows while invoking commonizer via :commonizeDistribution
Tools. Compiler Plugins
KT-69401
Kotlin power assert plugin doesn't work correctly with safe cast operatorKT-69290
PowerAssert: implicit receivers included in power-assert generated diagramKT-68511
Power Assert kotlinx.assertEquals message display problemKT-68807
Power-Assert crashes the Kotlin compiler when if expression used as assertion parameterKT-68557
K2. Supertypes resolution of KJK hierarchy fails in presence of allopen plugin
Tools. Compiler plugins. Serialization
KT-68931
JS/Native + serialization: partial linkage errorKT-69039
FIR: Implement IDE-only checker for kotlinx.serialization compiler plugin to report IDE-only diagnosticsKT-68752
Serializable annotation on Java class is not taken into account in K2 checker
Tools. Daemon
KT-68297
KGP 2.0 regression: JAVA_TOOL_OPTIONS is not considered in Kotlin daemon creation
Tools. Fleet. ObjC Export
KT-68887
ObjCExport: K1 text fixture@Deprecated
supportKT-68841
ObjCExport:@Deprecated
supportKT-68826
ObjCExport: SerializersModuleBuilder
Tools. Gradle
New Features
KT-68651
Compose: provide a single place in extension to configure all compose flags
Performance Improvements
KT-61861
Gradle: Kotlin compilations depend on packed artifacts
Fixes
KT-69330
KotlinCompile friendPathsSet property is racy due causing build cache invalidationKT-69444
Don't warn about missing Compose Compiler Gradle plugin in some casesKT-65271
Gradle: "Mutating dependency DefaultExternalModuleDependency after it has been finalized has been deprecated " with gradle 8.6-rc-3KT-69026
Mark AGP 8.5.0 as compatible with KGPKT-67822
Deprecate JVM history files based incremental compilationKT-67771
Compatibility with Gradle 8.8 releaseKT-65820
Compatibility with Gradle 8.7 releaseKT-64378
Compatibility with Gradle 8.6 releaseKT-68661
Move ExperimentalWasmDsl to kotlin-gradle-plugin-annotationsKT-69291
Compose Gradle plugin: Enable strong skipping by defaultKT-65528
Migrate rest of Gradle integration tests to new Test DSLKT-68306
Project isolation for FUS statistics: Cannot access project ':' from project ':app' at org.jetbrains.kotlin.gradle.report.BuildMetricsService$ Companion.initBuildScanExtensionHolderKT-67395
Add new plugins to collector kotlin gradle performanceKT-67766
Build against Gradle API 8.7KT-67890
Compile against Gradle 8.8 API artifactKT-68773
Kotlin 2.0.0 with Gradle 8.8: ConcurrentModificationException on BuildFusService configurationMetricsKT-67889
Run tests against Gradle 8.8 releaseKT-69078
Gradle: Add option to disable FUS ServiceKT-68308
Project isolation for FUS statistics: An error is thrown at org.gradle.configurationcache.ProblemReportingCrossProjectModelAccess$ProblemReportingProject.getLayoutKT-58280
org.jetbrains.kotlin.jvm Gradle plugin contributes build directories to the test compile classpath
Tools. Gradle. Kapt
KT-61928
Clarify parameter types in KaptArguments and KaptJavacOption
Tools. Gradle. Multiplatform
KT-69310
w: KLIB resolver: The same 'unique_name=...' found in more than one library for diamond source set structuresKT-66568
w: KLIB resolver: The same 'unique_name=...' found in more than one libraryKT-69406
Deprecate combinations of KMP plugin with some Gradle Java pluginsKT-66209
Accessing the source sets by name is confusingKT-56566
Consider pre-generating DSL accessors for source sets with names corresponding to the default target hierarchyKT-69129
KGP: stdlib version alignment for JS and WasmKT-62368
Kotlin 1.9.X fails to detect kotlin.test.Test annotation reference on commonTest source set when targeting JVM+AndroidKT-67110
Usage of BuildOperationExecutor.getCurrentOpeartion internal Gradle APIKT-68248
kotlin multiplatform project fail to build on Fedora with corretto
Tools. Gradle. Native
KT-68638
KGP 2.0 breaks native test with api dependencies and configuration cache
Tools. Kapt
KT-68171
K2KAPT: boxed return types in overridden methods changed to primitivesKT-68145
K2 KAPT: missing $annotations methods for const properties and private properties without accessors
Tools. Scripts
KT-69296
scripting dependency resolution does not authenticate towards maven mirrorsKT-68681
K2 / CLI / Script: "NullPointerException: getService(...) must not be null" caused by@DependsOn
Tools. Wasm
KT-69245
K/Wasm: Remove warning of working-in-progressKT-69154
K/Wasm: wasmJsBrowserProductionRun flaky crash with "WebAssembly.instantiate(): Import ... function import requires a callable"KT-67980
Wasm: Incorrect "Please choose a JavaScript environment to build distributions and run tests" when WASM is not configured