Changelog
Analysis. API
Fixes
KT-62982K2: Cannot get a PSI element for 'Enum.values'KT-59732FirLazyResolveContractViolationException:lazyResolveToPhase(IMPORTS)cannot be called from a transformer with a phase IMPORTS from serialisation pluginKT-61757K2 IDE: resolution to buitlins does not work for from common moduleKT-62676K2 IDE: Reference shortener does not recoginize redundant this referencesKT-63627K2 IDE: shorten reference shortens required qualifierKT-62675K2 IDE: Reference shortener does not recoginize redundant labelsKT-63771fe10: KtNamedClassOrObjectSymbol#isInline does not cover value classesKT-62947Analysis API: Error while resolving FirPropertyImplKT-60327K2 IDE. "IllegalArgumentException: source must not be null" during delegation declarationKT-63700K2: "FirLazyExpression should be calculated before accessing" in the case of secondary constructorKT-62111K2 IDE. IllegalArgumentException on for loop with iterator declaration attemptKT-63538Analysis API: Removing a contract statement viaPsiElement.delete()does not trigger an out-of-block modificationKT-63694K1/K2 IDE. "RuntimeException: Broken stub format, most likely version of kotlin.FILE (kotlin.FILE) was not updated after serialization changes" exception on incorrect class nameKT-63560Analysis API: Modifiable PSI tests cannot rely on the cached application environment to allow write accessKT-62980ImplementKtFirSimpleNameReference#getImportAliasKT-63130Analysis API: No receiver found for broken code during commit documentKT-60170K2 IDE: CCE from KtFirCallResolver on invalid code with wrong implicit invokeKT-61783K2: Analyze 'KtCodeFragment' in a separate sessionKT-62010K2: IDE K2: "ConeClassLikeTypeImpl is not resolved to symbol for on-error type"KT-62957Analysis API: NullPointerException on call resolution when builtins are not availableKT-62899K2 IDE. IDE ignores@Suppressannotation for errorsKT-62935Analysis API:kotlin.Cloneableshould not be available in Kotlin/Native sourcesKT-62910Analysis API: create AbstractFirPsiNativeDiagnosticsTest for LL FIRKT-63096K2: Analysis API: KotlinAnnotationsResolver for IDE is created with incorrect scopeKT-63282K2 Script: annotation arguments phase should resolve propagated annotationsKT-63223Analysis API: reference to declarations with kotlin* package are not resolvedKT-63195AA: incorrect results fromKtTypeProvider#getReceiverTypeForDoubleColonExpression
Analysis. Light Classes
KT-63552Symbol Light Classes don't support arrayOf and similar without parameters in property initializers and default parameter valuesKT-63486SLC: a lot of RAM is allocated inorg.jetbrains.kotlin.asJava.LightClassUtil.isMangled
Backend. Wasm
KT-62863Execution failed for task ':kotlinx-serialization-properties:wasmJsD8Test' in serialization in the K2 QG
Compiler
New Features
KT-22004Allow to resolve CONFLICTING_OVERLOADS with Deprecated(HIDDEN)KT-61955Support more wider actual member visibility, if the expect member is effectively final
Fixes
KT-63695JVM: Don't use plugin extensions when compiling code fragmentKT-59903K2: Disappeared DELEGATE_SPECIAL_FUNCTION_NONE_APPLICABLEKT-62961K2 / KMP: NO_ACTUAL_CLASS_MEMBER_FOR_EXPECTED_CLASS with expect enum class and typealiasKT-59369K2: Missing BUILDER_INFERENCE_STUB_RECEIVERKT-53749Support builder inference restriction in FIRKT-59390K2: Missing BUILDER_INFERENCE_MULTI_LAMBDA_RESTRICTIONKT-59887K2: Disappeared ACTUAL_MISSINGKT-62885Introduce a language feature entry for expect actual classes for easier configuration of MPP projectsKT-62589K2: Investigate need of non-nullable IdSignature in Fir2IrLazyDeclarationsKT-63329K2: difference in SAM-conversion casts generationKT-64062K2 IDE. NPE on typing nullable parameter in returnKT-63761K2: False positive "Unresolved reference" caused by object's parameter in enum class which is passed as annotation parameterKT-55252Backend Internal error during psi2ir in native compile tasks (NPE in getKlibModuleOrigin)KT-50453Improve builder inference diagnostics with type mismatch due to chosen inapplicable overloadKT-56949K2: Builder inference violates upper boundKT-64028K2: Investigate questionable condition in FirBuilderInfernceSessionKT-60031K2: Introduced NO_ACTUAL_CLASS_MEMBER_FOR_EXPECTED_CLASSKT-63646K2: "IllegalStateException: Return type of provideDelegate is expected to be one of the type variables of a candidate, but D was found"KT-59881K2: Disappeared UNSUPPORTEDKT-64136K2: NSME with Anvil compiler pluginKT-63448K2: CONFLICTING_INHERITED_JVM_DECLARATIONS with@JvmFieldKT-63865K2: "IllegalArgumentException: Failed requirement." caused by lambda parameters with different type in init blockKT-62609K2. Type argument inference changed for object of Java class with several common parentsKT-63081Optimize new native caches: CachedLibraries.computeVersionedCacheDirectory()KT-63580"AssertionError: access of const val: GET_FIELD" caused by const value and variable with delegationKT-63567"NoSuchMethodError" on getting value of lazily initialized property by companion's const valueKT-63540Restrict the CONFLICTING_OVERLOADS + DeprecatedLevel.HIDDEN ignore to final callablesKT-30369Smartcasts from safe call + null check don't work if explicit true/false check is usedKT-30376Smartcasts don't propagate to the original variable when use not-null assertion or cast expressionKT-30868Unsound smartcast if smartcast source and break is placed inside square brackets (indexing expression)KT-31053Nothing? type check isn't equivalent to null check is some placesKT-29935Smartcasts don't work if explicit annotated true/false check is usedKT-30903Smartcast to null doesn't affect computing of exhaustivenessKT-62847K2: Introduce FIR node for SAM conversionKT-63564K/Wasm: CompilationException with 2.0.0-Beta1KT-63345K2: FIR2IR chooses an incorrect type for smartcast in case of SAM conversionKT-63848ReflectiveAccessLowering does not count arguments of super-callsKT-61920K2: False negative CONST_VAL_WITH_NON_CONST_INITIALIZER when initializer is Java fieldKT-63649K2: Wild card in superclass confuses EXPANSIVE_INHERITANCE checkerKT-63569K2: "IllegalStateException: ?!id:1" caused by private function callKT-63842K2: some arguments of annotations on local declarations are unresolvedKT-63832K2: missed context during annotation argument resolution for a type alias, init and property receiverKT-62559KMP, K2: prevent reporting ACTUAL_ANNOTATIONS_NOT_MATCH_EXPECT twice in CLIKT-24652Elvis with 'break' can produce unsound smartcasts in while-true loopKT-28508Possible unsound smartcast in class initializerKT-28759No not-null smartcast from direct assignment if it's split into declaration and value assignmentKT-28760No not-null smartcast from direct assignment ofthisKT-29878Smartcasts from type check or null check don't work if explicit true check as reference equality is usedKT-29936Smartcasts don't work if comparing with return value of some function and explicit true/false check is usedKT-30317Smartcast doesn't work if smartcast source is used as an operand of the reference equalityKT-63071K2 supports calling functions with the dynamic receiver overNothing?KT-59896K2: Disappeared WRONG_ANNOTATION_TARGETKT-56849Implement K/Wasm K1 diagnostics in K2KT-31636Expect-actual matching doesn't work for inner/nested classes with explicit constructor using typealiasesKT-63361K2: Expected FirResolvedTypeRef for return type of FirDefaultPropertyGetter(SubstitutionOverride(DeclarationSite)) but FirImplicitTypeRefImplWithoutSource foundKT-63377K2: conflict between type parameter and nested classKT-62913Convert DEFAULT_ARGUMENTS_IN_EXPECT_ACTUALIZED_BY_FAKE_OVERRIDE to checking incompatibilityKT-63550K2: fake-override in expect covariant override in actual. Move diagnostics from backend to frontendKT-63443IrFakeOverrideBuilder: ISE "No new fake override recorded" when Java superclass declares abstract toStringKT-58933Applying suggested signature from WRONG_NULLABILITY_FOR_JAVA_OVERRIDE leads to red codeKT-63600K2: Duplicate WRONG_NULLABILITY_FOR_JAVA_OVERRIDEKT-63508K2: "IllegalArgumentException: Not FirResolvedTypeRef (String) in storeResult" caused by@DeprecatedJava function and typoKT-63656K2: "IllegalArgumentException: Local com/example/ should never be used to find its corresponding classifier"KT-63459K2: OPT_IN_USAGE_ERROR is absent when calling the enum primary constructorKT-59582OPT_IN_MARKER_CAN_ONLY_BE_USED_AS_ANNOTATION_OR_ARGUMENT_IN_OPT_IN on an annotation importKT-63732K1: False positive OUTER_CLASS_ARGUMENTS_REQUIRED inside anonymous objectKT-60614K2: Conflicting INVISIBLE_REFERENCE and UNRESOLVED_REFERENCE reported depending on FIR test for transitive friend module dependenciesKT-59983K2: Disappeared IMPLEMENTATION_BY_DELEGATION_IN_EXPECT_CLASSKT-57044K2 LL Tests: false-positive 'Overload resolution ambiguity between candidates: [@Override() fun test(): Unit , fun test(): Unit]'KT-58028K2: False-positive TYPE_PARAMETER_IS_NOT_AN_EXPRESSIONKT-62560K2: KAPT4: annotation@ReplaceWithis missing a default value for the element 'imports'KT-63068K2 supports typeRef-name labelsKT-63642JVM_IR: don't generate reflective access to getter/setter without propertyKT-62212K2: require matching of suspend status for override checkKT-63597JVM_IR: Properly handle type parameters of outer declaration in code fragmentKT-61282K2: Incorrect overridden function forjava.nio.CharBuffer.getKT-63317K2: Disallow generic types in contract type assertionsKT-59922K2: Disappeared CANNOT_CHECK_FOR_ERASEDKT-63241IJ monorepo K2 QG: backward-incompatible compiler ABI change leads to run-time failures of Fleet's kotlinc pluginsKT-59988K2: Disappeared TYPE_ARGUMENTS_NOT_ALLOWEDKT-59936K2: Disappeared ARGUMENT_PASSED_TWICEKT-63522K2: wrong context for delegated field typeKT-63454Properly check that inline fun is in the same module as callee inIrSourceCompilerForInlineKT-59951K2: Disappeared NO_TYPE_ARGUMENTS_ON_RHSKT-63535K2: Apply DFA implications for nullable Nothing to both sidesKT-62727K2: Missing JSCODE_UNSUPPORTED_FUNCTION_KINDKT-62726K2: Missing JSCODE_WRONG_CONTEXTKT-62725K2: Missing JSCODE_INVALID_PARAMETER_NAMEKT-62314Make usages of JavaTypeParameterStack safeKT-60924FIR2IR: Get rid of all unsafe usages of IrSymbol.ownerKT-57949FIR: SignatureEnhancement: mutation of java enum entryKT-59908K2: Disappeared RECURSIVE_TYPEALIAS_EXPANSIONKT-62724K2: Missing WRONG_JS_FUN_TARGETKT-62856K2: Don't create IR declaration when its symbol is accessed in fir2irKT-61329K2: Review for diagnostic messages reported by CLI arguments processingKT-60604K2: introduced NON_PUBLIC_CALL_FROM_PUBLIC_INLINE,@PublishedApineeded for constants in annotationsKT-63286K2: Top-level properties in scripts are missing initialization checksKT-62711Incorrect ParsedCodeMetaInfo instancesKT-63122K2: Improve 'EVALUATION_ERROR' messagesKT-63164K2/JVM: compiler codegen crash on invisible property IllegalStateException: Fake override should have at least one overridden descriptorKT-62352jspecify NonNull annotation seems not supportedKT-56614K2: Incorrect overload resolution with SAM typesKT-62783K2: False positive CAST_NEVER_SUCCEEDS when casting nullable expression to it's non-nullable generic base classKT-47931FIR DFA: smartcast not working forif (x!=null || x!=null && x!=null) {}KT-62735K2: Disappeared EXTERNAL_CLASS_CONSTRUCTOR_PROPERTY_PARAMETERKT-62733K2: Disappeared WRONG_EXTERNAL_DECLARATIONKT-62734K2: Disappeared INLINE_EXTERNAL_DECLARATIONKT-62618K2: Fix theensureAllMessagesPresenttestKT-60312K2: CCE “class [I cannot be cast to class java.lang.Number ([I and java.lang.Number are in module java.base of loader 'bootstrap')” on using IntArray as varargKT-61362K2: Properties/fields are missing from system librariesKT-52432Using the IDE compiled with K2 (useFir) throws VerifyError exceptionKT-59825K2: Fix the TODO aboutwasExperimentalMarkerClassesinFirSinceKotlinHelpersKT-26045False positive DUPLICATE_LABEL_IN_WHEN for safe callsKT-63094K2: Exception from fir2ir during conversion data class with property of dynamic typeKT-59822K2: Fix the TODO in FirConstChecksKT-59493Definitely non-nullable types have type inference issues with extension functionsKT-63396K2: property from companion object are unresolved as an annotation argument in type parameterKT-62925K2: Disappeared EXPOSED_FUNCTION_RETURN_TYPE for package-private and type argsKT-63430IrFakeOverrideBuilder: VerifyError on calling a function with a context receiver from a superclassKT-62420K2: Remove ConeClassifierLookupTag from ConeTypeVariableTypeConstructorKT-59998K2: Disappeared OPT_IN_MARKER_CAN_ONLY_BE_USED_AS_ANNOTATION_OR_ARGUMENT_IN_OPT_INKT-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-57529K1/K2: "IllegalStateException: not identifier: " with hard keywords in angle bracketsKT-59401K2: Missing ADAPTED_CALLABLE_REFERENCE_AGAINST_REFLECTION_TYPEKT-63147K2: False negative DSL_SCOPE_VIOLATION when member is annotated with@LowPriorityInOverloadResolutionKT-63172K2: Java vararg setter should not be used as property accessorKT-62306K2: Compiler internal error for incorrect call on ILTKT-61592kt57320.kt weird diagnostic range for NO_ACTUAL_FOR_EXPECTKT-60294K2: lambda inside object capturing this, when not in K1KT-62590Split expect/actual matcher-checker machinery in two separate components: matcher and checkerKT-62120K2: "NoSuchMethodError: java.lang.String" at runtime on class delegating to Java typeKT-36976FIR: Provide exact smart casting typeKT-62628K2: FirErrorTypeRefImpl doesn't have annotationsKT-62447K2. "Replacing annotations in FirErrorTypeRefImpl is not supported" compiler error when annotation is used as variable type or return typeKT-62541K2: Missed type mismatch errorKT-37591Deprecate cases in FE 1.0 when companion property is prioritized against enum entry
Docs & Examples
KT-58295Create a separate page for https://kotl.in/wasm_helpKT-6259Docs: add information about default constructor for class
IDE
KT-55788[SLC] Declarations with value classes are leaked into light classes
IDE. Gradle. Script
KT-60813Scripts: NoSuchMethodError: 'void org.slf4j.Logger.error(java.lang.String, java.lang.Object)' when dependency uses Slf4j API
IDE. JS
KT-61257Analysis API:"KotlinIllegalArgumentExceptionWithAttachments: Invalid FirDeclarationOrigin DynamicScope" exception on unsupported JS dynamic usage in scope
IDE. Multiplatform
KT-45513Run c-interop generation in parallel during project importKT-63126K2: Analysis API Standalone: IllegalStateException from Kotlin/Native klib
IDE. Script
KT-61267K2 Scripts: dependency issues
IR. Actualizer
KT-62292K2: Extract IrActualizer into separate moduleKT-63442IrFakeOverrideBuilder: ISE "Multiple overrides" error when function signatures differ only in the type parameter upper bound
IR. Interpreter
KT-62683K2: FIR2IR: IrConst*Transformer doesn't evaluate an expression for const val initializer
IR. Tree
KT-61970Refactor IR and FIR tree generators to reuse common logicKT-61703Drop the dependency on kotlinpoet for IR tree generationKT-63437IrFakeOverrideBuilder: ISE "Captured Type does not have a classifier" on complex Java hierarchy
JavaScript
Fixes
KT-61117Migrate remaining legacy IC tests to IRKT-63808compileTestDevelopmentExecutableKotlinJs failed in JsIntrinsicTransformersKT-61523KJS: Call main function in per-file modeKT-63543KJS / K2: Exported declaration uses non-exportable return type type: 'kotlin.Unit'KT-63089KJS / K2 : "IllegalArgumentException: source must not be null " for inner class and interface as typeKT-62077KJS: TypeError: str.charCodeAt is not a functionKT-63436K/JS: Eliminate names for synthetic classes in setMetadataFor()KT-61929KJS: "IllegalStateException: No dispatch receiver parameter for FUN LOCAL_FUNCTION_FOR_LAMBDA" caused byrunfunction in init blockKT-63013KJS:requireNotNullnot working correctly in JS tests with Kotlin 1.9.20KT-63207KMP / JS: "TypeError: <mangled_name> is not a function" with 1.9.20KT-16981js: Command line arguments passed tomain()are always emptyKT-61525KJS: Test functions are not invoked in per-file mode
Klibs
KT-62259KLIB ABI reader: add information about a backing field to AbiPropertyKT-62515Interop klib of concurrent version is not accepted when building dependent project: "The library versions don't match"
Language Design
KT-62138K1: false positive (?) NO_SET_METHOD for += resolved as a combination of Map.get and plusKT-61573Emit the compilation warning on expect/actual classes. The warning must mention that expect/actual classes are in Beta
Libraries
KT-62346Sublists of ListBuilder does not correctly detect ConcurrentModificationKT-59441Design reading and writing future versions of Kotlin metadataKT-57922kotlinx-metadata-jvm does not take into account strict semantics flagKT-63341K2: JVM StringBuilder has no corresponding members for expected class membersKT-51058Avoid byte array allocation in File.writeText when possibleKT-63447K2: stdlib buildscript error: file included in two modules
Native
KT-63789Native: Incremental compilation problem with composeKT-50547[Commonizer] K/N echoServer sample fails with multiple "Unresolved reference" errors on Windows
Native. Build Infrastructure
KT-63905Extract ObjC Export Header generation from K/N backendKT-63220[K/N] Unable to specify custom LLVM distribution
Native. C and ObjC Import
KT-63287[K/N] Create test model for building/executing C-Interop testsKT-63048K2 ObjC interop: Fields are not supported for Companion of subclass of ObjC type
Native. ObjC Export
KT-63153Native: implement a flag to emit compiler warnings on ObjCExport name collisions
Reflection
KT-60708Reflection: Not supported)(parentheses in backticks)
Tools. Compiler Plugins
KT-53861K2. Report SERIALIZER_TYPE_INCOMPATIBLE on specific type argument in kotlinx.serializationKT-63086K2: "Parcelable should be a class"KT-61432K2 Parcelize. RawValue is not recognized if parameter is annotated via typealias
Tools. Compiler plugins. Serialization
KT-63591K2: "KotlinReflectionInternalError: Could not compute caller for function" on generated internal constructorKT-63570K2 / Serialization: "Class * which is serializer for type * is applied here to type *. This may lead to errors or incorrect behavior."KT-63402K2 / Serialization: "SyntheticAccessorLowering should not attempt to modify other files!" caused by sealed base with generic derived class in separate files
Tools. Gradle
New Features
KT-61975Re-purpose kotlin.experimental.tryK2
Performance Improvements
KT-63005Avoid registering KMP related compatibility/disambiguration rules for pure JVM/Android projects
Fixes
KT-60733Allow specify log level for compiler arguments used to compile sourcesKT-63697The warning is still presented in terminal after suppressing it with -Xexpect-actual-classes flagKT-63491Restore access to top-level DSL to configure compiler options in MPPKT-55322Kotlin daemon: Cannot perform operation, requested state: Alive > actual: LastSessionKT-63369Fix: "The org.gradle.api.plugins.BasePluginConvention type has been deprecated."KT-63368Fix "The automatic loading of test framework implementation dependencies has been deprecated. "KT-63601Fetching Gradle compiler DSL objects using raw strings is inconvenient in the Groovy DSLKT-62758Gradle: make precise task outputs backup enabled by defaultKT-62955Missing static accessors for Wasm targets in Kotlin Gradle plugin DSL:KT-62962Remove COMPILE_INCREMENTAL_WITH_ARTIFACT_TRANSFORM system propertyKT-63499Gradle: Source sets conventions are still registeredKT-52976Remove deprecated Gradle conventions usagesKT-62939Bump minimal supported AGP version to 7.1KT-58223Kotlin Gradle plugin shouldn't store data in project cache directoryKT-62131Could not isolate value org.jetbrains.kotlin.gradle.plugin.statistics.BuildFlowService$Parameters_Decorated@63fddc4bof type BuildFlowService.ParametersKT-62264Send build type report metric to FUSKT-62617Update report configuration project FUS metrics
Tools. Gradle. Cocoapods
KT-63331CocoaPods plugin noPodspec() causes "property * specifies file * which doesn't exist."
Tools. Gradle. JS
KT-62780K/JS: Deprecate node-specific properties in NodeJsRootExtensionKT-63544KGP: JS - KotlinJsIrLink is not compatible with Gradle CC starting 8.4KT-63312KJS: Apply IR flags for JS compilations unconditionallyKT-62633wasmWasi/JsNodeTest tasks are always not up-to-dateKT-63040K/JS: Rework outputs of webpack and distribution task
Tools. Gradle. Multiplatform
KT-63315Wasm gradle plugin DSL is invalid for parameterless wasmWasi methodKT-63338[KMP] metadata task fails to find cinterop classes from dependency projectsKT-63197After using Kotlin 1.9.20 on Windows 11, the gradle sync failedKT-63044KGP: Multiplatform - 8.4 configuration cache supportKT-63011Apple Framework Artifacts is not connected to KotlinNativeTask
Tools. Gradle. Native
KT-56455Gradle: removeenableEndorsedLibsfrom codebase
Tools. Incremental Compile
KT-56963Add MPP/Jvm incremental compilation tests for both K1 and K2 modesKT-63876Move useful utilities from KmpIncrementalITBase.kt to KGPBaseTest and/or common utilsKT-63010Build reports may contain incorrect measurements for "Total size of the cache directory"KT-59178With language version = 2.0 incremental compilation of JVM, JS fails on matching expect and actual declarations
Tools. JPS
KT-63549Add compiler performance metrics to JPS build reportsKT-64026Maven. JVM target is imported as 1.6(deprecated) if an invalid parameter value specified in pom.xmlKT-63594ClassCastException in JPS statisticsKT-63799Make plugin classpath serialization path agnostic
Tools. Kapt
KT-60821[KAPT4] Make sure that KAPT produces correct JCTree; if that's not possible, investigate using JavaPoet as an alternativeKT-57389KAPT3 uses a Javac API for JCImport which will break in JDK 21
Tools. Maven
KT-63322Add tests for KTIJ-21742
Tools. Scripts
KT-58367Remove script-util from the repoKT-54819Scripts: Not able to use slf4j in .main.ktsKT-63352Scripting dependencies resolver logs "file not found" even if the artefact is retrieved
Tools. Wasm
KT-63417KMP hierarchy DSL. Split withWasm() into withWasmJs() and withWasmWasi()
Checksums
| File | Sha256 |
|---|---|
| kotlin-compiler-2.0.0-Beta2.zip | a2866984b7e6ddd0aa4cab27bb3179d36116a72b62836df6f51d8d737b6f73b1 |
| kotlin-native-linux-x86_64-2.0.0-Beta2.tar.gz | db20c4da4fd7d5d50af1fafa809f1cc56a9517df28cf684ab98dccfa79c9115d |
| kotlin-native-macos-x86_64-2.0.0-Beta2.tar.gz | bafc9419f782a7b0bfa630014d5f286dee6e49218211e1dc573d72ed63c87ca5 |
| kotlin-native-macos-aarch64-2.0.0-Beta2.tar.gz | 569a2ba9a79499b2d71b74a4bb7e26afcbc911f5af0fab69537f3d86b46ab42d |
| kotlin-native-windows-x86_64-2.0.0-Beta2.zip | 7dcf52ca098d8089ed2edde15d44a80123c53e49763ea7dabc554afed7005163 |