Skip to content

Kotlin 2.0.0-Beta1

Pre-release
Pre-release
Compare
Choose a tag to compare
@KotlinBuild KotlinBuild released this 15 Nov 15:23

Changelog

Analysis. API

Performance Improvements

  • KT-61789 K2: optimize getFirForNonKtFileElement for references inside super type reference
  • KT-59498 K2: getOnAirGetTowerContextProvider took too much time due to on air resolve
  • KT-61728 Analysis API: optimize AllCandidatesResolver.getAllCandidates

Fixes

  • KT-61252 K2: IDE K2: "By now the annotations argument mapping should have been resolved"
  • KT-62310 K2 IDE. False positives errors with external annotations
  • KT-62397 K2 IDE. FP Error in the editor on RequiresOptIn annotation from the lib despite the warning level
  • KT-62705 K2: "lazyResolveToPhase(IMPORTS) cannot be called..." from light classes
  • KT-62626 IllegalStateException: Cannot build symbol for class org.jetbrains.kotlin.psi.KtScriptInitializer
  • KT-62693 K2: IDE K2: "PSI should present for declaration built by Kotlin code"
  • KT-62674 K2: "Scope for type ConeClassLikeTypeImpl" is null from transitive dependencies
  • KT-61889 Analysis API: Migrate KtFirReferenceShortener to ContextCollector instead of FirResolveContextCollector
  • KT-62772 Analysis API: No 'org.jetbrains.kotlin.fir.java.FirSyntheticPropertiesStorage'(31) in array owner: LLFirSourcesSession when analysing builtins in a context of common code
  • KT-61296 K2: do not resolve the entire file on lazyResolve call if FirFile is passed
  • KT-60319 K2 IDE: "Stability for initialized variable always should be computable"
  • KT-62859 K2 IDE: "Evaluate expression" throws exception when calling "Any?.toString()"
  • KT-62421 K2: IDE K2: "lazyResolveToPhase(BODY_RESOLVE) cannot be called from a transformer with a phase BODY_RESOLVE."
  • KT-63058 K2 IDE: Code completion unexpectedly imports static/companion object method
  • KT-62588 getExpectedType should not calculate type of the expression
  • KT-61990 K2: Unexpected returnTypeRef for FirSyntheticProperty
  • KT-62625 K2: 'FirLazyExpression should be calculated before accessing' for unresolved super type
  • KT-62071 Analysis API: KtFirScopeProvider.getScopeContextForPosition throws exception when ImplicitReceiverValue.implicitScope is null
  • KT-62691 K2: optimize getFirForNonKtFileElement for references inside 'where'
  • KT-62587 K2 IDE. FP unresolved reference on accessing nested class in annotation argument
  • KT-62834 K2: missing file node level in control flow builder
  • KT-62768 Analysis API: No 'org.jetbrains.kotlin.fir.scopes.impl.FirDelegatedMembersFilter'(44) in array owner: LLFirSourcesSession exception on analysing common code
  • KT-62874 K2: FirLazyExpression should be calculated before accessing
  • KT-62407 Analysis API: resolve [this] in KDoc to extension receiver
  • KT-61204 K2: "FirLazyExpression should be calculated before accessing in ktor HttpBinApplication"
  • KT-61901 Analysis API: Declared member scopes for Java classes are missing static members
  • KT-61800 Analysis API: Provide separate declared member scopes for non-static and static callables
  • KT-61255 Analysis API: Get rid of valueOf, values and entries from a declared member scope
  • KT-62466 Expected type for functional expression should include inferred types
  • KT-61203 IDE K2: "Expected FirResolvedArgumentList for FirAnnotationCallImpl of FirRegularClassImpl(Source) but FirArgumentListImpl found"
  • KT-61791 Analysis API: Implement combined getPackage for combined Kotlin symbol providers
  • KT-62437 K2 IDE. Resolution does not work inside lambda expression in constructor argument in supertypes
  • KT-62244 K2: Analysis API Standalone: Resolving klib dependencies from binary roots terminates application
  • KT-62897 K2 IDE. Unresolved declarations from libraries which are doubled in intellij project libraries
  • KT-61615 K2: No 'org.jetbrains.kotlin.fir.analysis.js.checkers.FirJsModuleKind' in array owner: LLFirSourcesSession
  • KT-59334 K2: LLFirImplicitTypesLazyResolver problems
  • KT-62038 K2: Nested classes are missing in symbol light class structure tests for libraries
  • KT-61788 Analysis API: Symbol for FirAnonymousInitializer cannot be null
  • KT-62139 Analysis API: KtFe10AnalysisSession.createContextDependentCopy does not need validity check
  • KT-62090 Analysis API: introduce an API to get a substitution formed by class inheritance
  • KT-62268 K2 IDE. No autocompletion and IllegalStateException for Pair
  • KT-62302 Support PsiType -> KtType conversion
  • KT-60325 K2 IDE. "IllegalArgumentException: source must not be null" on throw usage attempt
  • KT-61431 K2: KtPropertyAccessorSymbolPointer pointer already disposed for $$result script property
  • KT-60957 K2: Analysis API: Reference shortener does not work correctly with invoke function calls on properties
  • KT-58490 K2: LLFirTypeLazyResolver problems
  • KT-58494 K2: LLFirAnnotationArgumentsLazyResolver problems
  • KT-58492 K2: LLFirBodyLazyResolver problems
  • KT-58769 K2: LL FIR: implement platform-dependent session factories
  • KT-60343 K2 IDE. IllegalArgumentException on passing incorrect type parameter to function
  • KT-61383 K2: 'KtCompilerFacility' fails on code fragment compilation in library sources with duplicated dependencies
  • KT-61842 K2: reduce number of "in-block modification" events
  • KT-62012 K2: "KtReadActionConfinementLifetimeToken is inaccessible: Called outside analyse method"
  • KT-61371 K2: Analysis API standalone: register compiler symbol provider for libraries in standalone mode
  • KT-61422 K2 IDE: "No array element type for vararg value parameter: org.jetbrains.kotlin.fir.declarations.impl.FirValueParameterImpl"
  • KT-60611 K2: reduce number of "in-block modification" events
  • KT-61425 Analysis API: Provide a way to get a declared member scope for an enum entry's initializing anonymous object
  • KT-61405 Analysis API: An enum entry should not be a KtSymbolWithMembers
  • KT-60904 K2: IDE K2: "For DESTRUCTURING_DECLARATION_ENTRY with text _, one of element types expected, but FirValueParameterSymbol found"
  • KT-61260 K2 Scripts: Containing function should be not null for KtParameter
  • KT-61568 FIR Analysis API: collectCallCandidates gives presence to the top level functions in the presence of more suitable overrides
  • KT-60610 K2 IDE: move "out of block" processing logic into LL FIR
  • KT-61597 Analysis API: KotlinIllegalStateExceptionWithAttachments: expected as maximum one expect for the actual on errorneous code with multiple expects
  • KT-59793 K2: class org.jetbrains.kotlin.fir.declarations.impl.FirErrorImportImpl cannot be cast to class org.jetbrains.kotlin.fir.declarations.FirResolvedImport
  • KT-61599 K2: ContextCollector: Support smart cast collection
  • KT-61689 Analysis API: ContextCollector provides incorrect context in scripts
  • KT-61683 Analysis API: resolve ambiguities in kotlin project
  • KT-61245 Analysis API: ContextCollector provides incorrect context for supertype constructor calls
  • KT-60384 K2: Opening @JvmName source in IDEA: NPE at PsiRawFirBuilder$Visitor.toFirConstructor()
  • KT-60918 K2 IDE: "FirDeclaration was not found for class org.jetbrains.kotlin.psi.KtDestructuringDeclarationEntry, fir is null"
  • KT-61013 K2 Scripts: LLFirReturnTypeCalculatorWithJump: No designation of local declaration
  • KT-59517 K2 IDE: KotlinExceptionWithAttachments: Modules are inconsistent
  • KT-61331 K2: add cache restoring in case of existing context
  • KT-61408 K2: IDE K2: "Inconsistency in the cache. Someone without context put a null value in the cache"

Backend. Native. Debug

  • KT-57365 [Native] Incorrect debug info on inline function call site

Backend. Wasm

  • KT-62147 [Kotlin/Wasm] Nothing typed when expression cause a backend error
  • KT-61958 Update SpiderMonkey and return its usage in box tests when they switch to the final opcodes for GC and FTR proposals
  • KT-60828 K/Wasm: return br_on_cast_fail usages
  • KT-59720 K/Wasm: update to final opcodes
  • KT-59084 WASM: "RuntimeError: illegal cast" caused by inline class and JsAny
  • KT-60700 [WASM] test FirWasmCodegenBoxTestGenerated.testSuspendUnitConversion failed after KT-60259

Compiler

New Features

  • KT-62239 Allow enum entries without parentheses uniformly
  • KT-22004 Allow to resolve CONFLICTING_OVERLOADS with Deprecated(HIDDEN)
  • KT-11712 Smart cast is not applied for invisible setter
  • KT-61077 Support provideDelegate inference from var property type
  • KT-59504 K2 compiler does not require resolved 'componentX' functions for the placeholder ('_') variables in the destructuring declarations

Performance Improvements

  • KT-62619 FIR: Checker performance regression due to MISSING_DEPENDENCY checkers
  • KT-62044 Do not add nullability annotations to the methods of anonymous class
  • KT-62706 Optimize KtSourceElement.findChild()
  • KT-62513 Do not add nullability annotations to the methods of local classes
  • KT-61991 K2: avoid redundant full body resolution for properties during implicit type phase
  • KT-61604 [K/N] Bitcode dependency linking is slow for large compilations
  • KT-39054 Optimize delegated properties which call get/set on the given KProperty instance on JVM
  • KT-61635 K2: getConstructorKeyword call in PsiRawFirBuilder.toFirConstructor forces AST load
  • KT-57616 K2: Consider optimizing reversed versions of persistent lists in FirTowerDataContext

Fixes

  • KT-63257 K2: FIR2IR inserts incorrect implicit cast for smartcasted variable
  • KT-61459 K2: type parameters cannot be parameterized with type arguments
  • KT-61959 K2: Type parameters from outer class leak to nested class
  • KT-61384 IrFakeOverrideBuilder incorrectly checks visibility for friend modules
  • KT-62032 K2: Render flexible types as A..B instead of cryptic ft<A, B> in diagnostic messages
  • KT-59940 K2: Disappeared ACTUAL_ANNOTATION_CONFLICTING_DEFAULT_ARGUMENT_VALUE
  • KT-61243 K2: Always use declaredMemberScope-s in FirConflictsHelpers instead of declarations
  • KT-59430 K2: Missing CALLABLE_REFERENCE_RESOLUTION_AMBIGUITY
  • KT-56683 K2: No control flow analysis for top-level properties
  • KT-62334 K2: FIR should not generate delegated functions for methods from java interface with default implementation
  • KT-59590 JVM IR: NotImplementedError during rendering of conflicting JVM signatures diagnostic
  • KT-62607 K2: "Overload resolution ambiguity between candidates"
  • KT-55096 K2: false-positive smartcast after equals check with reassignment in RHS of ==
  • KT-62590 Split expect/actual matcher-checker machinery in two separate components: matcher and checker
  • KT-62120 K2: "NoSuchMethodError: java.lang.String" at runtime on class delegating to Java type
  • KT-62916 K2: False positive INCOMPATIBLE_MATCHING
  • KT-62752 expect-actual matcher/checker: return type must be "checking" incompatibility
  • KT-62137 Compiler fails on null tracking (inference) for safe call
  • KT-59744 K2: false negative VAL_REASSIGNMENT in case of reassignment inside custom setter
  • KT-58531 K2: "Property must be initialized" compile error
  • KT-62404 K2 Scripting for gradle: unresolved name errors on implicit imports
  • KT-62305 K2: Missing Fir metadata serialization support for scripts
  • KT-62197 K2 and Apache Commons's MutableLong: Overload resolution ambiguity between candidates
  • KT-53551 suspend functional type with context receiver causes ClassCastException
  • KT-61491 K2 AA: Multiple FIR declarations for the same delegated property
  • KT-55965 K2: NPE via usage of functions that return Nothing but have no return expressions
  • KT-60942 K2: Transitive dependency IR is not deserialized correctly
  • KT-55319 K2: False negative NON_LOCAL_RETURN_NOT_ALLOWED for non-local returns example
  • KT-62151 K2. overload resolution ambiguity for calls of Java record compact constructors
  • KT-62944 K2: Symbols with context receiver shouldn't be rendered with line break
  • KT-62394 K2: Synthetic property scope doesn't consider java classes in the hierarchy
  • KT-60117 K2: ISE β€œCannot serialize error type: ERROR CLASS: Cannot infer variable type without initializer / getter / delegate” on compiling lateinit property without initialization
  • KT-61039 False positive ABSTRACT_MEMBER_NOT_IMPLEMENTED in K1 when expect actual super types scopes don't match
  • KT-60042 K2: Introduced PRIMARY_CONSTRUCTOR_REQUIRED_FOR_DATA_CLASS
  • KT-59402 K2: Missing EXPANSIVE_INHERITANCE and EXPANSIVE_INHERITANCE_IN_JAVA
  • KT-62467 K2: Result type of elvis operator should be flexible if rhs is flexible
  • KT-62126 KJS / K2: "InterpreterError: VALUE_PARAMETER" caused by reflection, delegation and languageVersion = 1.9
  • KT-62679 K2: drop ARGUMENTS_OF_ANNOTATIONS phase
  • KT-56615 K2: False-negative USELESS_CAST after double smartcast
  • KT-59820 K2: Investigate the TODO in FirCastDiagnosticsHelpers
  • KT-61100 K2: wrong type for "value" parameter of java annotation constructor
  • KT-62491 K2. No 'when' expression must be exhaustive error when Java sealed class inheritors are not listed in permits clause
  • KT-60095 K2: Introduced INCOMPATIBLE_TYPES
  • KT-61598 K2: report IR_WITH_UNSTABLE_ABI_COMPILED_CLASS
  • KT-59561 K2/MPP reports INCOMPATIBLE_MATCHING when an actual annotation declaration with vararg property is typealias with @Suppress
  • KT-60123 K2: PROPERTY_WITH_NO_TYPE_NO_INITIALIZER isn't working in IDE for lateinit property without a type
  • KT-59935 K2: Disappeared PROPERTY_WITH_NO_TYPE_NO_INITIALIZER
  • KT-58455 K2(LT). Internal compiler error "UninitializedPropertyAccessException: lateinit property identifier has not been initialized" on missing type parameter in "where" constraint
  • KT-60714 K2: Implement resolve to private members from Evaluator in K2
  • KT-59577 K2. Enum constant name is not specified in error text
  • KT-60003 K2: Disappeared INVALID_CHARACTERS_NATIVE_ERROR
  • KT-62099 K2: "Type arguments should be specified for an outer class" error about typealias
  • KT-60983 K2: "Argument type mismatch: actual type is android/view/View.OnApplyWindowInsetsListener but androidx/core/view/OnApplyWindowInsetsListener? was expected"
  • KT-60111 K2: Location regressions for operators
  • KT-59399 K2: Missing JSCODE_NO_JAVASCRIPT_PRODUCED
  • KT-59388 K2: Missing JSCODE_ERROR
  • KT-59435 K2: Missing JSCODE_ARGUMENT_SHOULD_BE_CONSTANT
  • KT-60601 K2 / Maven: Overload resolution ambiguity between candidates inline method
  • KT-60778 K2: implement MISSING_DEPENDENCY_CLASS(_SUPERCLASS) errors
  • KT-62581 K2: Difference in kind flag in metadata
  • KT-59956 K2: Disappeared INAPPLICABLE_OPERATOR_MODIFIER
  • KT-35913 Diagnostic error VAL_REASSIGNMENT is not reported multiple times
  • KT-60059 K2: Introduced VAL_REASSIGNMENT
  • KT-59945 K2: Disappeared ANONYMOUS_FUNCTION_WITH_NAME
  • KT-62573 K2: incorrect parsing behavior with named functions as expressions
  • KT-56629 K2: an instance of USELESS_CAST was not moved under EnableDfaWarningsInK2 language feature
  • KT-58034 Inconsistent resolve for nested objects in presence of a companion object property with the same name
  • KT-59864 K2: Bad locations with delegates
  • KT-59584 K2: Bad startOffset for 'this'
  • KT-61388 K2: ISE "Annotations are resolved twice" from CompilerRequiredAnnotationsComputationSession on nested annotation
  • KT-62027 "java.lang.IndexOutOfBoundsException: Empty list doesn't contain element at index 0" caused by ClassicExpectActualMatchingContext.kt when annotation @AllowDifferentMembersInActual used
  • KT-61055 K2: Investigate if usage of toResolvedCallableSymbol is correct at FirDataFlowAnalyzer#processConditionalContract
  • KT-61688 K2: FIR renderings of type annotations leak through the diagnostics' messages
  • KT-61794 FIR: MergePostponedLambdaExitsNode.flow remains uninitialized after resolve
  • KT-61068 Bounds of type parameters are not enforced during inheritance of inner classes with generic outer classes
  • KT-61065 K2: @Suppress annotation is ignored inside preconditions of when-clauses
  • KT-61937 K2: implicit script receiver from ScriptDefinition are not visible for invoke
  • KT-61076 K2: false-positive conflicting overloads error on suspending function and private Java method from a supertype
  • KT-61075 K2: type inference for delegate expressions with complexly bounded type variables fails on properties with annotated accessors
  • KT-58579 K2: false-positive new inference error on invoking a generic function on Java wildcard type bounded by raw-typed Java inner class
  • KT-62671 K2: fir2ir generates a duplicate of delegated function for class from a common module
  • KT-60682 K2: Disappeared DEPRECATION
  • KT-62143 Error: Identity equality for arguments of types 'kotlin/Int?' and 'kotlin/Nothing?' is prohibited
  • KT-61517 K2: FirModuleDescriptor should correctly provide dependencies from FirModuleData
  • KT-62578 K2: @NoInfer annotation doesn't work for deserialized functions
  • KT-59916 K2: Disappeared REPEATED_ANNOTATION
  • KT-62450 K2: Disappeared OPT_IN_USAGE_ERROR for a data class property during the destructuring declaration
  • KT-59997 K2: Disappeared OPT_IN_USAGE_ERROR
  • KT-62393 K2: FIR doesn't count visibility when creating synthetic property override
  • KT-61208 EnumEntries mappings are generated incorrectly in the face of incremental compilation
  • KT-61786 K2: Remove type enhancement on java final fields
  • KT-57811 K2: make java static string and int fields not null
  • KT-62531 InvalidProtocolBufferException on reading module metadata compiled by K2 from compilers earlier than 1.8.20 with -Xskip-metadata-version-check
  • KT-59371 K2: Missing MISSING_DEPENDENCY_CLASS
  • KT-61511 IrFakeOverride builder: objc overridability condition is not supported
  • KT-62316 K2: CONFLICTING_INHERITED_JVM_DECLARATIONS on List subclass inheriting remove/removeAt from Java superclass
  • KT-60671 KMP: check other annotation targets in expect and actual annotations compatibility checker
  • KT-62451 K2: Disappeared OPT_IN_USAGE_ERROR for typealias
  • KT-62452 K2: Violation of OPT_IN_USAGE_ERROR non-propagating opt-in rules for typealias
  • KT-59927 K2: Disappeared INVISIBLE_REFERENCE
  • KT-60104 K2: Introduced FUNCTION_CALL_EXPECTED
  • KT-57513 K2: Bound smart casts don't work with Strings
  • KT-62146 K2: @Suppress does not work with named argument
  • KT-62475 K2: IrExternalModuleFragments contains incorrect data in Fir2Ir
  • KT-61983 K2: *fir.kt.txt dump uses different naming approach for local vars
  • KT-59970 K2: Disappeared NULLABLE_TYPE_IN_CLASS_LITERAL_LHS
  • KT-58216 K2 (2.0): when is not checked for exhaustiveness with Java sealed class
  • KT-62036 KMP: consider prohibiting actual fake-override when the corresponding expect class has default arguments
  • KT-61205 Compose Compiler K2/ios: No file for /App|App(){}[0] when running linkPodDebugFrameworkIosX64
  • KT-58240 Support running irText compiler tests against the Native backend
  • KT-59565 K2. Internal error "IndexOutOfBoundsException: Index -1 out of bounds for length 0" on incorrect usage of annotation in type parameter
  • KT-59393 K2: Missing TYPE_ARGUMENTS_FOR_OUTER_CLASS_WHEN_NESTED_REFERENCED
  • KT-59954 K2: Disappeared REPEATED_MODIFIER
  • KT-62127 "NoSuchFieldError: TRUE$delegate" on referencing companion's variable in submodule
  • KT-57100 K2 does not report Conflicting overloads and backend crashes with Exception during IR lowering on conflict overloading with suspend function
  • KT-62129 K2: Verification error on calling an extension from an env with 2+ context receivers
  • KT-59955 K2: Disappeared INCOMPATIBLE_MODIFIERS
  • KT-61572 [K2/N] Missing diagnostic SUPER_CALL_WITH_DEFAULT_PARAMETERS in test for MPP supercall with default params
  • KT-59514 K2: New inference error with jspecify and Java interop
  • KT-62263 Turn "different expect/actual members" error into a warning
  • KT-62262 [K2/N] tests/samples/uikit compilation fails with NPE in checkCanGenerateOverrideInit
  • KT-52213 Context receivers: "No mapping for symbol: VALUE_PARAMETER" caused by contextual suspending function type with receiver
  • KT-62114 K2: Unresolved reference for smart cast inside when (but not if)
  • KT-59373 K2: Missing INVISIBLE_MEMBER
  • KT-61844 K2: "Expression * of type * cannot be invoked as a function" caused by private property
  • KT-60581 K2 fails with New inference error for assertThat under strange circumstances
  • KT-61735 [FIR] Assignment to val with flexible type dispatch receiver causes crash
  • KT-59942 K2: Disappeared ANNOTATION_PARAMETER_DEFAULT_VALUE_MUST_BE_CONSTANT
  • KT-62058 K2: use PRE_RELEASE flag until 2.0-RC
  • KT-59931 K2: Disappeared CLASS_LITERAL_LHS_NOT_A_CLASS
  • KT-59377 K2: Missing CALL_TO_JS_MODULE_WITHOUT_MODULE_SYSTEM
  • KT-61645 K2/KMP: Set stdlib-native before stdlib-commonMain in dependencies for shared native metadata compilation
  • KT-61974 K2: "ClassCastException: class cannot be cast to class java.lang.Void" in test
  • KT-61637 K2: Store all IR declarations inside Fir2IrDeclarationStorage
  • KT-61924 Native: problem with abstract fake override from Any
  • KT-60921 K2: IndexOutOfBoundsException on attempt to cast an element to inner class with type parameter
  • KT-61933 K2: "Argument type mismatch: actual type is 'Foo<kotlin/Function0<kotlin/Unit>>' but 'Foo<kotlin/coroutines/SuspendFunction0<kotlin/Unit>>' was expected"
  • KT-59429 K2: Missing ABBREVIATED_NOTHING_RETURN_TYPE
  • KT-59420 K2: Missing ABBREVIATED_NOTHING_PROPERTY_TYPE
  • KT-59965 K2: Disappeared CANNOT_ALL_UNDER_IMPORT_FROM_SINGLETON
  • KT-61732 K2: Analysis API: resolve ambiguities in kotlin project
  • KT-60499 K2: Order of synthetic fields is different from K1's order
  • KT-61773 K2 Native: support reporting PRE_RELEASE_CLASS
  • KT-61578 [FIR] Resolution to private companion objects does not produce INVISIBLE_REFERENCE diagnostic
  • KT-62031 K2: Render k2-specific flexible types in a more compact way in diagnostic messages
  • KT-62030 K2: Render dot-separated FQNs instead of slash-separated ones in diagnostics
  • KT-59950 K2: Disappeared ILLEGAL_ESCAPE
  • KT-61827 K2: Fix rendering of NO_ACTUAL_CLASS_MEMBER_FOR_EXPECTED_CLASS message
  • KT-61386 IrFakeOverrideBuilder: wrong dispatch receiver type
  • KT-59907 K2: Disappeared RETURN_TYPE_MISMATCH
  • KT-62056 K2: Drop FIR_COMPILED_CLASS error in K1
  • KT-61824 K2: Don't render internal compiler type annotations in diagnostic messages
  • KT-61826 K2: Fix rendering of SUSPENSION_POINT_INSIDE_CRITICAL_SECTION message
  • KT-57858 @PlatformDependent annotation should be considered in JS and Native
  • KT-61876 K2: FirCommonSessionFactory does not register visibility checker for a library session
  • KT-60264 K2: while loop body block sometimes replaced with single expression
  • KT-58542 K2: Store abbreviated types in deserialized declarations as attributes for rendering
  • KT-62008 K2: Java getter function may be enhanced twice
  • KT-61921 K2: Check for false positive/negative diagnostics caused by wrong handling of typealiases
  • KT-41997 False positive "Value class cannot have properties with backing fields" inside expect class
  • KT-62017 K2: ISE "No real overrides for FUN FAKE_OVERRIDE" on calling package-private Java method through anonymous object
  • KT-58247 Incorrect inference of nullable types inside Optional
  • KT-61309 K2: Only named arguments are available for Java annotations
  • KT-61366 IrFakeOverrideBuilder ignores package-private visibility
  • KT-59899 K2: Disappeared EXPECTED_DECLARATION_WITH_BODY
  • KT-59980 K2: Disappeared EXPECTED_ENUM_CONSTRUCTOR
  • KT-59982 K2: Disappeared EXPECTED_CLASS_CONSTRUCTOR_PROPERTY_PARAMETER
  • KT-61499 K2: False positive "Const 'val' initializer should be a constant value" when using typealias
  • KT-62005 K2: No conflicting declarations error for constructors of nested classes and member functions
  • KT-61972 K2: FIR2IR crashes on converting data classes in MPP setup
  • KT-60105 K2: Introduced UNDERSCORE_USAGE_WITHOUT_BACKTICKS
  • KT-61443 K2: Return typeId -1 during JS compilation
  • KT-60075 K2: Introduced ACTUAL_WITHOUT_EXPECT
  • KT-61668 Put expect/actual diagnostics introduced in 1.9.20 release under 1.9 Language Version
  • KT-61751 IrFakeOverrideBuilder: keep flexible type annotations when remapping/substituting types
  • KT-61778 K2: Overload resolution ambiguity between expect and non-expect in native build
  • KT-61367 K2: Introduce OptIn for FirExpression.coneTypeOrNull
  • KT-61802 K2: infinite recursion in constant evaluator causing StackOverflowError
  • KT-60043 K2: Introduced PROPERTY_AS_OPERATOR
  • KT-61691 K2: This annotation is not applicable to target 'local variable'
  • KT-59915 K2: Disappeared TOO_MANY_ARGUMENTS
  • KT-59925 K2: Disappeared VIRTUAL_MEMBER_HIDDEN
  • KT-61173 K2: FirProperty.hasBackingField is true for an expect val
  • KT-61696 K2: Cannot override method of interface if superclass has package-protected method with same signature
  • KT-59370 K2: Missing JS_NAME_CLASH
  • KT-36056 [FIR] Fix implementation of try/catch/finally in DFA
  • KT-61719 K2. Invisible reference is shown for whole type reference instead of single name reference
  • KT-60248 K2: Type abbreviations are not stored in IR
  • KT-59251 KMP/JS: forbid matching actual callable with dynamic return type to expect callable with non-dynamic return type
  • KT-61510 K2: internal declarations are invisible in cyclically dependent modules
  • KT-60048 K2: Introduced MISSING_EXCEPTION_IN_THROWS_ON_SUSPEND
  • KT-59425 K2: Missing JS_FAKE_NAME_CLASH
  • KT-61060 K2: Rewrite delegate inference
  • KT-59529 K2: "property delegate must have" caused by class hierarchy
  • KT-55471 K2. Unresolved reference for nested type is shown instead of outer class
  • KT-58896 K2: Higher priority expect overload candidates in common code lose in overload resolution to non-expects
  • KT-58476 Context receivers: "No mapping for symbol: VALUE_PARAMETER" with context-receiver inside suspended lambda calling another suspended function
  • KT-60780 K2: missing PRE_RELEASE_CLASS
  • KT-59855 K2: Replace FirExpression.typeRef with coneType
  • KT-59391 K2: Missing JS_BUILTIN_NAME_CLASH
  • KT-59392 K2: Missing NAME_CONTAINS_ILLEGAL_CHARS
  • KT-59110 K2. "NotImplementedError: An operation is not implemented." error on incorrect @Target annotation
  • KT-53565 K2: no WRONG_ANNOTATION_TARGET on when subject
  • KT-54568 K2: Type variables leak into implicit it parameter of lambdas
  • KT-60892 K2: Implement diagnostics around @OptionalExpectation
  • KT-61029 K2: Duplicates when processing direct overridden callables
  • KT-60917 K2: "Unresolved reference" for operator for array value
  • KT-59367 K2: Missing MIXING_SUSPEND_AND_NON_SUSPEND_SUPERTYPES
  • KT-60268 K2: lazy annotation classes have wrong modality
  • KT-61129 K2: Implement error suppression warning
  • KT-60536 K2: FIR2IR Crash when resolving to companion of internal class with Suppress("INVISIBLE_REFERENCE")
  • KT-55196 K2: False-negative CONST_VAL_WITH_NON_CONST_INITIALIZER on boolean .not() call
  • KT-60292 K2: annotations on local delegated properties are lost
  • KT-59418 K2: Missing DUPLICATE_PARAMETER_NAME_IN_FUNCTION_TYPE
  • KT-59422 K2: Missing NON_SOURCE_ANNOTATION_ON_INLINED_LAMBDA_EXPRESSION
  • KT-57963 K2: MPP: Annotation calls should be actualized
  • KT-61407 K2: java.lang.IllegalArgumentException: Stability for initialized variable always should be computable
  • KT-59186 K2: False negative CONFLICTING_OVERLOADS in nested functions
  • KT-54390 K2: ClassId for local classes do not match with specification
  • KT-61277 K2: Expand the MIXING_SUSPEND_AND_NON_SUSPEND_SUPERTYPES check to other function kinds
  • KT-61548 Compiler crashes with StackOverflowError when mapping types
  • KT-56757 Drop IGNORE_BACKEND_K2_LIGHT_TREE directive
  • KT-61330 K2: No BinarySourceElement for system libraries
  • KT-61166 Inherited platform declaration clash & accidental override
  • KT-58764 [K2] Make FirResolvedDeclarationStatus.modality not nullable
  • KT-61576 [FIR] Private type alias for public class constructor is always visible
  • KT-60531 K2/JS: Report diagnostics before running FIR2IR
  • KT-59900 K2: Disappeared NESTED_CLASS_NOT_ALLOWED
  • KT-59344 K2: implement deprecation warnings from KT-53153
  • KT-61067 K2. No Assignments are not expressions
  • KT-61144 FIR2IR: Fix field access for class context receiver from debugger evaluator in K2
  • KT-59914 K2: Disappeared RETURN_NOT_ALLOWED
  • KT-60136 Wrong IR is generated for spread call in annotation call when annotation has a vararg parameter
  • KT-56872 K2: not all reassignments, operator assignments, increments, decrements are tracked in DFA for try/catch expressions
  • KT-60397 K2/MPP: don't perform enhancement twice when Java method is called from different modules
  • KT-61640 K2: Share declarations from JvmMappedScope between sessions in MPP scenario
  • KT-59051 "ISE: IrSimpleFunctionSymbolImpl is already bound" when implementing multiple interfaces by delegation where one of them overrides equals/hashCode
  • KT-60380 K2: IAE: class org.jetbrains.kotlin.psi.KtLambdaArgument is not a subtype of class org.jetbrains.kotlin.psi.KtExpression for factory TYPECHECKER_HAS_RUN_INTO_RECURSIVE_PROBLEM
  • KT-60795 K2: missing INCOMPATIBLE_CLASS and corresponding CLI error
  • KT-59650 K2: Get rid of FirNoReceiverExpression
  • KT-60555 K2. FirJavaClass source field is null
  • KT-61045 K2: Missing return from DELEGATED_PROPERTY_ACCESSOR setter
  • KT-60636 KMP: K2 handling of actual typealiases to nullable types
  • KT-59815 K2: Avoid recomputing argumentVariables
  • KT-61409 Kotlin/Native: crash in kmm-production-sample (compose-app) with escape analysis enabled
  • KT-61348 K2: Refactor FIR2IR declaration storages
  • KT-61249 Move fir-related code from backend.native module
  • KT-59478 K2: StackOverflowError on invalid code with nullable unresolved
  • KT-59893 K2: Disappeared WRONG_NUMBER_OF_TYPE_ARGUMENTS
  • KT-60450 K2: IOOBE from analyzeAndGetLambdaReturnArguments
  • KT-61442 K2: Consider stricter filtering on implicit integer coercion
  • KT-61441 K2: Wrong overload is chosen with ImplicitIntegerCoercion enabled
  • KT-57076 K2 does not report 'More than one overridden descriptor declares a default value'
  • KT-55672 K2. Operator name message instead of "Unresolved reference" when operator isn't defined for type
  • KT-60252 K2: Supertype argument is not substituted in fake override receivers and value parameters
  • KT-60687 K2: Introduced UNEXPECTED_SAFE_CALL
  • KT-59664 Inline modifier can be added to a constructor parameter, but it does not have any effect
  • KT-61312 K2: Remove FirExpression.typeRef completely when Compose was migrated
  • KT-60602 Fix scripting tests in 2.0 branch
  • KT-60771 K2: "Conflicting declarations". Unable to re-declare variable if the first one comes from a destructured element
  • KT-60760 K2: Every FirFunctionCall has an implicit type reference which points to the return type declaration
  • KT-59944 K2: Disappeared NON_MEMBER_FUNCTION_NO_BODY
  • KT-60936 KMP: check annotations compatibility on members inside expect and actual class scopes
  • KT-60668 KMP: check expect and actual annotations match when actual method is fake override
  • KT-60250 K2: origin is set too many times for elvis operator
  • KT-60254 K2: Extra unset type argument on Java field reference
  • KT-60245 K2: Extra return is generated in always throwing function
  • KT-59407 K2: Missing MISSING_CONSTRUCTOR_KEYWORD
  • KT-57681 Request review for all FIR diagnostic messages
  • KT-57738 K2: unresolved class fields and methods in kotlin scripts
  • KT-60885 K2: Fix testSelfUpperBoundInference test in LV 2.0 branch
  • KT-59957 K2: Missing UNSUPPORTED_SEALED_FUN_INTERFACE
  • KT-60000 K2: Missing UNSUPPORTED_INHERITANCE_FROM_JAVA_MEMBER_REFERENCING_KOTLIN_FUNCTION
  • KT-60886 K2: Fix testDirectoryWithRelativePath in LV 2.0 branch
  • KT-60002 K2: Missing UNSUPPORTED_SUSPEND_TEST
  • KT-59419 K2: Missing MULTIPLE_DEFAULTS_INHERITED_FROM_SUPERTYPES_WHEN_NO_EXPLICIT_OVERRIDE
  • KT-60297 K2: finally block is not coerced to unit
  • KT-59416 K2: Missing EXTERNAL_INTERFACE_AS_REIFIED_TYPE_ARGUMENT
  • KT-59417 K2: Missing CALL_FROM_UMD_MUST_BE_JS_MODULE_AND_JS_NON_MODULE
  • KT-59381 K2: Missing CALL_TO_JS_NON_MODULE_WITH_MODULE_SYSTEM
  • KT-59384 K2: Missing DYNAMIC_NOT_ALLOWED
  • KT-59406 K2: Missing PROPERTY_DELEGATION_BY_DYNAMIC
  • KT-57223 K2: false-negative INAPPLICABLE_JVM_NAME on non-final properties outside interfaces
  • KT-59413 K2: Missing VALUE_CLASS_CANNOT_HAVE_CONTEXT_RECEIVERS
  • KT-59387 K2: Missing NO_CONSTRUCTOR
  • KT-57803 K2. "Kotlin: Only the Kotlin standard library is allowed to use the 'kotlin' package" error missing in 2.0

IDE

Fixes

  • KT-62777 K2 IDE: False positive MISSING_DEPENDENCY_SUPERCLASS for built-ins in non-JVM modules
  • KT-61195 UAST modeling of implicit it is inconsistent for Enum.entries
  • KT-62757 SLC: incorrect nullability annotation on aliased type
  • KT-60318 K2: disable SLC for non-JVM platforms
  • KT-62440 On the fly resolve with light method context doesn't resolve method type parameters
  • KT-50241 Make Symbol Light Classes consistent with Ultra Light Classes
  • KT-56546 LL FIR: fix lazy resolve contract violation in Symbol Light Classes
  • KT-57550 K2: AA: incorrect constant value in file-level annotation
  • KT-61460 SLC: unnecessary upper bound wildcards (w/ type alias)
  • KT-61377 K2: SLC: wrong retention counterpart for AnnotationRetention.BINARY
  • KT-60603 K2: Investigate intellij tests failures in branch 2.0
  • KT-60590 Fix light classes related tests in branch 2.0

IDE. Gradle Integration

IDE. Multiplatform

  • KT-63007 K2: Analysis API Standalone: klibs are not resovled from common code
  • KT-61520 Sources.jar is not imported for common and intermediate source-sets from the MPP library

IDE. Script

  • KT-60418 K2 scripting: highlighting sometimes fails
  • KT-60987 K2: Analysis API: make build.gradle.kts resolution work on build scripts from kotlin projects

IR. Actualizer

  • KT-62623 K2: Ir actualizer leaves inconsistent module links from files

IR. Tree

  • KT-61934 Decouple building fake overrides from symbol table and build scheduling
  • KT-60923 IR: Mark IrSymbol.owner with OptIn

JavaScript

  • KT-61795 KJS: Incremental Cache is not invalidated if useEsClasses compiler argument was changed
  • KT-62425 K/JS: Implement K2 and K1 diagnostics for checking argument passing to js()
  • KT-58685 KJS: "IllegalStateException: Not locked" cused by "unlock" called twice
  • KT-56818 KJS: "TypeError: Class constructor * cannot be invoked without 'new'" when extending external class
  • KT-61710 K/JS: Implement JS_NAME_CLASH check for top level declarations
  • KT-61886 K/JS: Prepare K/JS tests for JS IR BE diagnostics
  • KT-60829 Fix JS Incremental tests in 2.0 branch
  • KT-60785 KJS: Destructured value class in suspend function fails with Uncaught TypeError: can't convert to primitive type error
  • KT-60635 K/JS: Class internal methods may clash with child methods from other module that have the same name
  • KT-60846 Fix IncrementalJsKlibCompilerWithScopeExpansionRunnerTestGenerated test in 2.0 branch

KMM Plugin

  • KT-60169 Generate gradle version catalog in KMM AS plugin
  • KT-59269 Update wizards in KMM AS plugin after 1.9.0 release

Klibs

  • KT-61767 [K/N] Header klibs should keep private underlying properties of value classes
  • KT-60807 [klib] Add an option to write out header klibs
  • KT-61097 [PL] Don't create an executable if there were errors in PL

Language Design

  • KT-58921 K1/K2: difference in Enum.values resolve priority
  • KT-61573 Emit the compilation warning on expect/actual classes. The warning must mention that expect/actual classes are in Beta
  • KT-62138 K1: false positive (?) NO_SET_METHOD for += resolved as a combination of Map.get and plus
  • KT-22841 Prohibit different member scopes for non-final expect and its actual

Libraries

  • KT-62785 Drop unnecessary suppresses in stdlib after bootstrap update
  • KT-58588 Optimizations for sequence functions distinct, flatten
  • KT-62004 Drop legacy JS compilations of stdlib and kotlin-test
  • KT-61614 WASM: Enum hashCode is not final

Native

  • KT-61642 [K/N] Serialize full IdSignatures to caches
  • KT-62803 Konanc has print statement "Produced library API in..." that should be deleted or properly logged at INFO level
  • KT-61248 [K/N] Extract native manglers out of backend.native module

Native. Runtime. Memory

  • KT-57773 Kotlin/Native: track memory in big chunks in the GC scheduler
  • KT-61093 Kotlin/Native: enable concurrent weak processing by default

Native. Stdlib

  • KT-60514 Add llvm filecheck tests for atomic intrinsics

Native. Testing

  • KT-62157 Native: Migrate FileCheck tests to new native test infra

Reflection

  • KT-60984 K2: java.lang.ClassNotFoundException: kotlin.Array in runtime with Spring Boot test
  • KT-60709 Reflection: Not recognized bound receiver in case of 'equals' always returning true
  • KT-61304 Reflection: Calling data class copy method via reflection (callBy) fails when the data class has exactly 64 fields

Tools. CLI

  • KT-62644 Don't enable in progressive mode bug-fix features without target version
  • KT-62350 CLI: no color output on Apple silicon Macs
  • KT-61156 K2: do not try to run compilation if there were errors during calculation of Java module graph
  • KT-48026 Add the compiler X-flag to enable self upper bound type inference

Tools. Compiler Plugin API

  • KT-61872 K2: Adding annotations to metadata from backend plugin doesn't work in the presence of comments on annotated declaration

Tools. Compiler Plugins

  • KT-60849 jvm-abi-gen: do not treat hasConstant property flag as a part of ABI for non-const properties
  • KT-53926 K2. Don't check serializable properties from supertypes

Tools. Compiler plugins. Serialization

  • KT-62215 Serialization / Native: "IllegalArgumentException: No container found for type parameter" caused by serializing generic classes with a field that uses generics
  • KT-62522 K2 + kotlinx.serialization + Native: NPE when generic base class has inheritor in other module

Tools. Gradle

New Features

Performance Improvements

  • KT-62318 Android Studio sync memory leak in 1.9.20-Beta

Fixes

  • KT-62650 Gradle: Return the usage of kotlin-compiler-embeddable back
  • KT-61295 KotlinTestReport captures Project.buildDir too early
  • KT-62987 Add tests for statistics plugin in Aggregate build
  • KT-62964 Build Gradle plugin against Gradle 8.4 API
  • KT-61896 Gradle: compilation via build tools API doesn't perform Gradle side output backups
  • KT-61918 Removal of an associated compilation from a build script doesn't lead to full recompilation
  • KT-59826 Update SimpleKotlinGradleIT#testProjectIsolation to run on Gradle 8
  • KT-61401 The reported language version value for KotlinNativeLink tasks in build reports and build scans is inaccurate
  • KT-62024 K/Wasm: Binaryen modifying compiler output
  • KT-61950 K/Wasm: Add warning about changed sourceSets
  • KT-61895 KotlinTopLevelExtension.useCompilerVersion is not marked as experimental
  • KT-56574 Implement a prototype of Kotlin JVM compilation pipeline via the build tools API
  • KT-61206 Build system classes may leak into the Build Tools API classloader
  • KT-61737 GradleStyleMessageRenderer.render misses a space between the file and the message when location is (line:column = 0:0)
  • KT-61457 Kotlin Gradle Plugin should not use internal deprecated StartParameterInternal.isConfigurationCache

Tools. Gradle. JS

  • KT-41382 NI / KJS / Gradle: TYPE_MISMATCH caused by compilations.getting delegate
  • KT-53077 KJS / Gradle: Remove redundant gradle js log on kotlin build
  • KT-61992 KJS / Gradle: KotlinJsTest using KotlinMocha should not show output, and should not run a dry-run every time.
  • KT-56300 KJS / Gradle: plugin should not add repositories unconditionally
  • KT-55620 KJS / Gradle: plugin doesn't support repositoriesMode
  • KT-56465 MPP: Import with npm dependency fails with "UninitializedPropertyAccessException: lateinit property fileHasher has not been initialized" if there is no selected JavaScript environment for JS target
  • KT-41578 Kotlin/JS: contiuous mode: changes in static resources do not reload browser page

Tools. Gradle. Kapt

  • KT-22261 Annotation Processor - in gradle, kapt configuration is missing extendsFrom
  • KT-62518 kapt processing is skipped when all annotation processors are indirect dependencies

Tools. Gradle. Multiplatform

  • KT-62601 AS/IntelliJ exception after updating a KMP project with a macos target to Kotlin 1.9.20-RC
  • KT-60734 Handle the migration from ios shortcut and source set with getting
  • KT-59042 "Cannot build 'KotlinProjectStructureMetadata' during project configuration phase" when configuration cache enabled
  • KT-62029 Kotlin 1.9.20-Beta fails to detect some transitive dependency references in JVM+Android source set
  • KT-61652 MPP ConcurrentModificationException on transformCommonMainDependenciesMetadata
  • KT-61622 Upgrading to Kotlin 1.9 prevents commonMain sourceset classes from being processed by kapt/ksp (dagger/Hilt)
  • KT-61540 K2: KMP/K2: Metadata compilations: Discriminate expect over actual by sorting compile path using refines edges
  • KT-59020 1.9.0 Beta Kotlin plugin Gradle sync fails with intermediate JVM + Android source set
  • KT-60860 K2: Fix KotlinNativeCompileArgumentsTest in 2.0 branch
  • KT-61463 KMP: Remove unused 'kpm' code

Tools. Gradle. Native

  • KT-51553 Migrate all Kotlin Gradle plugin/Native tests to new test DSL and add CI configuration to run them
  • KT-61657 KonanTarget should implement equals or custom serialization
  • KT-62907 Turn on downloading Kotlin Native from maven by default
  • KT-61700 Native: linkDebugExecutableNative has duplicated freeCompilerArgs

Tools. Incremental Compile

  • KT-61865 Add support for incremental compilation within the in-process execution strategy in the build tools api
  • KT-61590 K2/KMP: Expect actual matching is breaking on the incremental compilation
  • KT-60831 Fix IncrementalMultiplatformJvmCompilerRunnerTestGenerated in 2.0 branch

Tools. JPS

  • KT-60737 Investigate/fix JPS-related tests in 2.0 migration branch

Tools. Kapt

  • KT-60507 Kapt: "IllegalAccessError: superclass access check failed" using java 21 toolchain
  • KT-62438 Change experimental K2 kapt diagnostic message
  • KT-61916 K2 KAPT. Kapt doesn't generate fully qualified names for annotations used as arguments to other annotations
  • KT-61879 K2 Kapt: java.lang.NoSuchMethodError during stub generation
  • KT-61729 K2: KAPT 4: Compiler crash during compilation of Sphinx for Android
  • KT-61333 K2 Kapt: support REPORT_OUTPUT_FILES compiler mode
  • KT-61761 Kapt4ToolIntegrationTestGenerated should not use Kapt3ComponentRegistrar

Tools. Maven

  • KT-54868 Stop publishing kotlin-archetype-js
  • KT-26156 Maven Kotlin Plugin should not WARN when no sources found
  • KT-60859 K2: Fix maven IncrementalCompilationIT tests in 2.0 branch

Tools. Parcelize

  • KT-57685 Support ImmutableCollections in Parcelize plugin

Tools. Scripts

  • KT-62400 K2: Missing annotation resolving for scripts
  • KT-61727 Scripts: Maven artifacts resolution is slow

Tools. Wasm

  • KT-61973 K/Wasm: wasmWasiNodeRun is missed
  • KT-61971 K/Wasm: wasmWasiTest should depends on kotlinNodeJsSetup

Checksums

File Sha256
kotlin-compiler-2.0.0-Beta1.zip 4cf6bea0d20463416936a5619293fa1c5931ab649496fe7045c12eedcf4136bd
kotlin-native-linux-x86_64-2.0.0-Beta1.tar.gz 4c0be3089394c977fdeb37a4a4722d06693d288bddec57128db2ee05fdb81212
kotlin-native-macos-x86_64-2.0.0-Beta1.tar.gz 3a67f1f751230de624a6d39ebcbea3e0034c813b060f9be609aac9966f1d2523
kotlin-native-macos-aarch64-2.0.0-Beta1.tar.gz 55d4ea61bb4b63649f3ebaf6d34185f55260e36fa6451dd398a6471e19d308e1
kotlin-native-windows-x86_64-2.0.0-Beta1.zip 7500111aedabc123886f865e014e37a5989aa05ca080a39c8f19540f2e7b2280