1.7.21
Compiler
KT-54463 Delegating to a field with a platform type causes java.lang.NoSuchFieldError: value$delegateKT-54509 Ir Interpreter: unable to evaluate string concatenation with “this” as argumentKT-54004 Builder type inference does not work correctly with variable assignment and breaks run-timeKT-54393 Change in behavior from 1.7.10 to 1.7.20 for java field override.KT-54615 JVM: Internal error in file lowering: java.lang.AssertionError: Error occurred while optimizing an expressionKT-54581 JVM: “VerifyError: Bad type on operand stack” with generic inline function and when inside try-catch blockKT-53146 JVM IR: unnecessary checkcast of null leads to NoClassDefFoundError if the type isn't available at runtimeKT-54600 NPE on passing nullable Kotlin lambda as Java's generic SAM interface with super type boundKT-54707 “VerifyError: Bad type on operand stack” in inline call chain on a nullable array valueKT-54650 Binary incompatible ABI change in Kotlin 1.7.20KT-54802 “VerifyError: Bad type on operand stack” for inline functions on arrays
Native. Runtime. Memory
KT-54498 Deprecation message of ‘FreezingIsDeprecated’ is not really helpful
Tools. Gradle. Multiplatform
KT-54387 Remove MPP alpha stability warningKT-48436 False positive “The Kotlin source set androidAndroidTestRelease was configured but not added to any Kotlin compilation”
Tools. JPS
KT-45474 False positive NO_ELSE_IN_WHEN on sealed class with incremental compilation
1.7.20
Analysis API
KT-52667 FIR IDE: fun interfaces (SAM interfaces) are not properly resolvedKT-52136 FIR: Implicit type declaration from the other module cannot be used for overloading
Analysis API. FE1.0
KT-51962 Analysis API: Finish Analysis API for FE1.0
Analysis API. FIR
KT-52779 FIR IDE: Import Optimizer cannot handle generic type qualifiersKT-50236 Fix OOB modification trackers for non-Kotlin codeKT-51240 Analysis API: KtAnalysisSession for a specific module cannot create a symbol for PSI that cannot be seen from that module.KT-50868 Analysis API: decompiled type aliases are not resolved
Compiler
KT-53739 Builder inference, extension hides membersKT-53733 Kotlin/Native: update source documentation for the new default memory managerKT-53667 Compiler crashes on attempt to alloc a string on the stack in new MMKT-53480 Internal error in file lowering: java.lang.ClassNotFoundException: com.android.systemui.R$stringKT-52843 Compose: NPE at Parameters.getParameterByDeclarationSlot if inline function with default arguments takes a lambda which captures value class represented by LongKT-53475 Kotlin/Native for iOS: “IllegalArgumentException: Sequence has more than one element”
New Features
KT-52495 Support until operator in back-endsKT-52420 Implement resolve of until operatorKT-52419 Implement until operator in the parserKT-33755 Kotlin/Native: Provide a way to customize a bundle Identifier of a generated frameworkKT-51665 FIR: implement label resolve for “typed this” caseKT-52361 Report warning on potentially empty intersection types
Performance Improvements
KT-47816 Disable script discovery for non-script environmentsKT-48635 JVM IR: Double/Float values are boxed when comparing for equality in equals method of data/value classesKT-23397 Optimize out field for property delegate when it's safe (JVM)
Fixes
KT-53272 Backend Internal error: Exception during IR lowering / No such value argument slot: 2KT-53124 Receiver type mismatch when combining extension properties, type projections, Java sources, and F-bounded type-variablesKT-51868 JVM / IR: Inconsistent behaviour between lambda expression and SAM interface conversion for the same interfaceKT-36770 Prohibit unsafe calls with expected @NotNull T and given Kotlin generic parameter with nullable boundKT-52974 “IllegalStateException: Symbol with IrSimpleFunctionSymbolImpl is unbound” compiling native targets of MPP projectKT-53007 JVM: “Bad invokespecial instruction: current class isn't assignable to reference class” when call superclass of outer class method from inner classKT-53019 K2: cannot cast callable reference to Function1 in runtimeKT-53031 K2 compiler crashes with IllegalStateException: No type in ProtoBuf.ValueParameterKT-29168 Prohibit upper bounds violation with generic typealias using not all type parameters as arguments for underlying type in supertypesKT-52432 Using the IDE compiled with K2 (useFir) throws VerifyError exceptionKT-52327 False negative: TYPECHECKER_HAS_RUN_INTO_RECURSIVE_PROBLEM isn't reportedKT-49682 Support JVM IR in KAPT stub generationKT-24643 Prohibit using a type parameter declared for an extension property inside delegateKT-51972 FIR, Gradle: “Symbol is invisible” compilation error with enabled Kotlin Lombok compiler pluginKT-52011 [FIR] All-open compiler plugin isn't supportedKT-51950 JVM IR: “IndexOutOfBoundsException: Cannot pop operand off an empty stack” with crossinline lambdas and interface delegationKT-52540 Native: kotlin.NotImplementedError with Arrow libraryKT-48031 “IllegalStateException: Type variable TypeVariable(T) should not be fixed!”KT-47708 RequiresOptIn check does not flag experimental method usage in SAM lambda expressionsKT-52913 JVM / IR: “IllegalArgumentException: Inline class types should have the same representation” when trying to down cast cast a value classKT-50771 IR partial linkage: Removed abstract callable members are not supportedKT-52994 Enable generic inline classes as experimental featureKT-52742 CYCLE_IN_ANNOTATION_PARAMETER_ERROR false positive on annotations with default valuesKT-52743 Non-null generic functions throws NPE when assigned to valKT-52745 Frontend / K2: “IncompatibleClassChangeError: class A$B overrides final method A.length()I” caused by delegation in a sealed classKT-52832 Tree-generator's method FirExpression::isFirType returns true and false for different field names; it should always be trueKT-52403 IncompatibleClassChangeError when inlining suspend funsKT-50107 Missed USAGE_IS_NOT_INLINABLE diagnostic: Leaking inline lambda parameter through extension receiverKT-47965 Missed USAGE_IS_NOT_INLINABLE diagnostic on inline lambda parameter usage as receiver of .let callKT-25787 No error on crossinline usage of receiver parameter of functional type in an inline functionKT-52762 Frontend / K2: Named arguments for Java classes lead to “Cannot find a parameter with this name”KT-52680 K2: overload resolution ambiguity if this is casted in a different methodKT-52676 K2: Unsupported compile-time value IrGetFieldImpl instead of IrConst in AnnotationCodegen for constant from JavaKT-50293 False positive: USELESS_CAST on stub typesKT-52175 WRONG_ANNOTATION_TARGET for annotation that used inside ifKT-52338 “IncompatibleClassChangeError: Expected non-static field” with Kotlin class with same-named companion object property as base Java class fieldKT-49507 JVM: “IllegalAccessError: class X tried to access private field” with same-named Kotlin property and Java base class fieldKT-44512 FIR DFA: incorrect smartcast after null assignment inside a lambdaKT-49200 FIR/FE 1.0: different behavior with multiple matching star importsKT-52718 declaringClass deprecation message mentions the wrong replacement in 1.7KT-52190 FIR2IR: Unexpected IrErrorTypeImpl type for put method inside buildMapKT-52197 Incorrect inference of var type inside lambda that passed to extension function with type parameters that defined inside this lambdaKT-52057 Unsupported compile-time value STRING_CONCATENATION and GET_FIELD in annotation argumentsKT-47823 JVM IR: “IllegalArgumentException: Inline class types should have the same representation” with break usage in the loop rangeKT-51883 Kotlin 1.6.20 generates “-” in type names around lambdas and inline extension function with reified type which breaks Apache BeamKT-52684 Syntax error regression on complicated combination of LT and GTEQKT-52417 Reflection: Can't reflect on type parameters captured by SAM converted lambdaKT-46797 JVM IR: suspendImpl has no generic signature, breaking reified types in anonymous object supertypes when using the type token patternKT-51464 FIR: Unable to infer type in coroutines flow codeKT-52163 JVM IR: Double.compareTo(Int) compiled to integer comparisonKT-41980 FIR: erroneous scope during annotation resolveKT-47159 KtPsiUtils.areParenthesesUseless() is returning a false positive on expressions for interface delegationKT-51418 Substitute anonymous type's supertypesKT-35544 kotlin.TypeCastException has no message on NativeKT-52386 StackOverflowError during Kotlin/Native gradle buildKT-52592 NPE from KProperty.getExtensionDelegate on property delegated to another propertyKT-52551 Delegating to object property reference does not invoke object's initializerKT-51704 Contracts: “AssertionError: Arguments and parameters size mismatch” with companion objectKT-25527 False positive UNUSED_VALUE for delegated property/variableKT-51002 [FIR] Hidden declaration hides visible oneKT-51008 [FIR] Star import does not work for nested calssifiers of java classKT-52407 FIR: Star import has lower priority than built-in importKT-52431 Reported error instead of warning due to empty intersection type foundKT-49394 Bad message and suggestion: The feature “unit conversion” is disabledKT-51168 FIR: Inference error with Java interop and captured typesKT-49961 “AssertionError: Left expression was not processed: BINARY_EXPRESSION” when analyzing dangling [bracketed] expression inside elvisKT-50108 Difference in fun interface conversion behavior for uninitialized not-null function valuesKT-51889 Calls to super-classes constructors with context receivers fail on runtimeKT-51228 [FIR] Unresolved reference on callable reference on implicit this with smartcastKT-52364 False positive for INFERRED_TYPE_VARIABLE_INTO_EMPTY_INTERSECTIONKT-52237 JVM / IR: “IllegalArgumentException: No argument for parameter VALUE_PARAMETER CONTINUATION_CLASS” when implementing Map interface on class with suspending functionsKT-50832 Method references to suspend inline functions are processed incorrectlyKT-52194 False positive “Class ‘my.packge.MyClass’ is compiled by a pre-release version of Kotlin and cannot be loaded by this version of the compiler” but builds fineKT-47203 JVM Debugger: Parameter value doesn't change for tailrec functionKT-52131 False positive variable unused warning when calling inline function in finally blockKT-51738 Debugger: stepping over in inline function with multiple inline lambda invocations is incorrectKT-52198 Losing reference to the value of an outer variable (Ref$ObjectRef) when using suspend inline with suspendCancellableCoroutineKT-50994 FIR: AssertionError during inference of delegated properties with implicit typesKT-51757 FIR does not see various JS/Native specific declarations in common modulesKT-51201 FIR: ARGUMENT_TYPE_MISMATCH diagnostic contains generic parameter instead of the actual typeKT-48444 FIR: type argument rejected for annotationKT-51754 JVM: Local variable table invalid for do-while with continueKT-51936 Breakpoint not hit on last line of suspend function on AndroidKT-27333 Forbid @Synchronized annotation on suspend functionsKT-51530 “StackOverflowError: CoroutineTransformerMethodVisitor.spillVariables” with data class in FlowKT-51460 FIR: Protected property inaccessible from inner classKT-53947 IllegalStateException: No mapping for symbol: VALUE_PARAMETER INSTANCE_RECEIVERKT-51234 Context receivers can be duplicated in function declarationKT-51576 Context receivers: “AssertionError: Callers must check that current token is IDENTIFIER followed with ‘@’” with at characterKT-49479 JVM / IR: “IllegalStateException: IrErrorType” during IR lowering with non-trivial recursion callsKT-52270 NullPointerException caused by braces on if-else returning a method reference inside lambdaKT-47621 False negative INVISIBLE_MEMBER on call to inaccessible protected synthetic property setterKT-37796 NI: “ISE: Error type encountered” when inferring type of a property that delegates to itselfKT-45430 PSI2IR: “org.jetbrains.kotlin.psi2ir.generators.ErrorExpressionException: null: KtCallExpression: toString()” with recursive function call in “also” block in nontrivial contextKT-52691 K2: Expected FirResolvedTypeRef with ConeKotlinType but was FirImplicitTypeRefImpl with intertwined functional interfacesKT-52822 Fix contract for KtElement.getReference()KT-50223 IndexOutOfBoundsException from ClassicTypeSystemContext$DefaultImpls.getParameter during call resolutionKT-51963 Change Maven version to 1.7.255KT-47664 Incorrect type checking in the case of generic typesKT-48765 NI: Inferred type does not respect the bound of type variableKT-51243 False positive error “No required context receiver” inside contextual lambdaKT-43541 TYPE_MISMATCH for member function which is not occur for top level function during unsafe castKT-51016 [FIR] False positive OVERLOAD_RESOLUTION_AMBIGUITY between two extensions on different supertypesKT-50155 FIR: support contextual receiversKT-38637 Catch NoSuchFieldException in optimized when expression over enum
Docs & Examples
KT-49896 Kotlin/JS: improve -Xir-property-lazy-initialization description due to making it true by default
IDE
KTIJ-22286 Kotlin JPS project created via wizard does not contain Kotlin libraries in case of not-released versionKTIJ-22065 IDE notification motivating Kotlin users to use EAPKTIJ-22209 Configure Kotlin on 221 idea adds 1.6.10 Kotlin (despite the fact that IDE plugin is 1.7.10)KTIJ-22171 Fix test BuiltInDecompilerConsistencyTestKTIJ-22016 Empty .kt file and build.gradle.kts can trigger an error while searching for a facade light classKT-52571 MPP Tasks on import are not up-to-date after subsequent launchesKT-47777 ISE thrown from KtLightClassForFacadeImpl.Companion.createForFacadeNoCache has wrong message.
IDE. FIR
KT-52360 FIR IDE: Make the fix of isInheritor method betterKT-51786 FIR IDE: IllegalStateException exception in Inspections' infrastructureKT-52331 Analysis API: ArrayIndexOutOfBoundsException exception in Diagnostics' infrastructure
IDE. Code Style, Formatting
KTIJ-21346 Incorrect formatting for functions with context receivers and visibility modifiers
IDE. Completion
KTIJ-21910 FIR IDE: Fix completion tests started failing after visibility checker refinement
IDE. Decompiler, Indexing, Stubs
KTIJ-21243 ContextReceivers: “UpToDateStubIndexMismatch: PSI and index do not match” plugin exception on library with context receivers usage attempt
IDE. Gradle Integration
KT-47627 IDE import fails with com.intellij.util.lang.PathClassLoader error for runCommonizer Gradle task on 212, 213 IDEAsKTIJ-21638 MPP: IntelliJ can not resolve MPP references in common-codeKT-52216 HMPP / KTOR: False positive “TYPE_MISMATCH” with Throwable descendant
IDE. Inspections and Intentions
KTIJ-22540 Invalid “remove unnecessary parentheses” when delegating a functional interface to a SAM in brackets
IDE. J2K
KTIJ-21665 J2K generates non compiling code when lifting return and one branch is broken before binary operator
IDE. JS
KTIJ-22337 Wizard: Kotlin/Js for browser: cssSupport DSL should be updated
IDE. K2
KTIJ-21672 FIR IDE: Method reference on generic class breaks resolveKTIJ-21714 FIR IDE: Inherently imported type from another module is not properly resolved
IDE. Script
KT-52525 Update scripts handling in source roots
IDE. Misc
KTIJ-21699 Refactoring: move out parts of the plugin useful for both FE10 and K2
JavaScript
New Features
KT-39423 KJS: Optionally generate a method to handle optional parameters for function in typescriptKT-42282 KJS IR: add an ability to run separate tests
Performance Improvements
KT-50270 KJS IR: Unnecessary getter and setter calls when accessing class members
Fixes
KT-51133 Kotlin/JS - IR: even simple lambdas generate a lot of useless boilerplateKT-51123 Provide a way to add comments to generated JSKT-48493 KJS / IR: Invalid d.ts for inner classes inside objectsKT-52553 KJS / IR: diamond hierarchy with super.toString produces stack overflow in runtimeKT-23252 JS: Unit materialization on declaration and assignmentKT-51128 Kotlin/JS - IR generate huge count of useless blocksKT-50778 KJS/IR: Inline class has no field when building production distributionKT-50157 KSJ IR: Applying identity equality operator to Chars always returns falseKT-38262 Javascript generation (and Typescript) fails on ‘then’, ‘catch’ and ‘finally’ (and others?) claiming they are reserved namesKT-51066 KJS / IR: suspend lambda parameter of value class is undefinedKT-51102 KJS/IR: Assertion failed at translateCallArguments(jsAstUtils.kt:343)KT-51878 KJS / Legacy: Unit is not materialized in an overridden method, but it should be
Language Design
KT-47986 Implicit inferring a type variable into an upper bound in the builder inference contextKT-49264 Deprecate infix function calls of functions named “suspend” with dangling function literalKT-25636 Native: Object is frozen by default problemKT-49303 Implement support for basic compile-time evaluation
Libraries
KT-52932 Open-ended ranges in the standard libraryKT-52910 Provide visit extension functions for java.nio.file.PathKT-48232 Multiplatform function for computing cubic rootKT-52778 The documentation for the Duration does not indicate any differences from the ISO-8601KT-52618 ThreadLocalRandom is not a good source of randomness on Android before SDK 34, so don't use it for Kotlin Random
Native
KT-53346 MPP project with kotlinx-serialization-json:1.4.0-RC is not built
Native. C Export
KT-45468 Kotlin/Native: Bitcode verification error when trying to export a cached klib to a static or dynamic library
Native. C and ObjC Import
KT-53373 Native: @ExportObjCClass doesn't work with the new memory managerKT-49034 Kotlin/Native: cnames.structs.Foo resolves into wrong declarationKT-26478 Objective-C object‘s class name is null in ClassCastException’s message
Native. ObjC Export
KT-51593 Include more information in Objective-C header documentationKT-33117 Improve customizing Info.plist in produced frameworksKT-52681 Native: @end; for Objective-C is generated with an unnecessary semicolon
Native. Platforms
KT-52226 Kotlin/Native: Add support for cross-compilation of MIPS targets from macOS and Windows hosts
Native. Runtime
KT-52430 KMM 1.6.21 framework built with Xcode13, new MM GC Can't support iOS 9.xKT-53534 Kotlin/Native: -Xruntime-logs=gc=info flag doesn't work with compiler caches in 1.7.20-beta
Native. Runtime. Memory
KT-52692 Kotlin/Native: fix tests with aggressive GCKT-52130 Kotlin/Native: use Xallocator for Kotlin objects onlyKT-51436 Kotlin/Native: optimize mark queue
Reflection
KT-51804 An error occurs when callBy a KFunction that contains a value class as an argument, has a default argument set, and has more than 32 arguments.
Tools. CLI
KT-52465 CLI: IllegalStateException IrSimpleFunctionPublicSymbolImpl when source root is duplicatedKT-52380 Invalid path to compiler plugins should be reported as a compiler errorKT-51025 JVM CLI compiler takes class file from classpath instead of input java source fileKT-51846 Setting random value to the compiler argument where number is expected should produce an error. “-Xbackend-threads=abcd”
Tools. Compiler Plugins
KT-52486 [K2] Looking for function/constructor whose parameters are annotated or meta annotatedKT-52872 Mark supportsK2 in ComponentRegistrar.kt as JvmDefault to avoid compatibility problemsKT-52804 A function obtained by Fir IrBuiltins has an incorrect packageKT-52468 Rename module and jar for lombok compiler plugin
Tools. Gradle
KT-53670 Gradle: Cyclic dependency between kotlin-gradle-plugin-idea-1.7.20-Beta and kotlin-gradle-plugin-idea-proto-1.7.20-BetaKT-53615 Gradle: Fix deprecation warnings in CleanableStoreImplKT-53118 Fully up-to-date builds are slower with Kotlin 1.7.0KT-51923 Improve usability of errors and warnings by being able to click on themKT-53244 Report from gradle about compiler pluginsKT-52839 Warn in Gradle log why incremental compilation failedKT-46019 Compatibility with Gradle 7.1 releaseKT-47047 Migrate Kotlin Gradle Plugin from using Gradle conventionsKT-52698 Don't add InspectClassesForMultiModuleIC task when new incremental compilation is enabledKT-52867 Provide simplified JVM toolchain configuration methodKT-45747 Add basic JUnit 5 Kotlin Gradle Plugin Android tests setupKT-46034 Shadow Kotlin Gradle plugin dependenciesKT-28664 Support ExtensionContainer on kotlin targets and source sets.KT-19472 Useful extensions of Gradle Kotlin DSL provided by Gradle Kotlin pluginKT-34393 Kotlin Gradle DSL: Inconsistent srcDir configuration between Java and KotlinKT-51629 There isn't enough info about incremental compilation state in logs while running build with --info key
Tools. Gradle. Cocoapods
KT-53174 CocoaPods: Synthetic Podfile does not specify platformKT-53127 “MaterialComponents normal armv7” in Cocoapods plugin between Kotlin 1.6.21 and 1.7.0KT-44155 Cocoapods doesn't support pods without module map file insideKT-49032 Cocoapods cinterop: some header files are not foundKT-53337 Add warning about future changing default linking type of framework provided via cocoapods plugin
Tools. Gradle. JS
KT-52637 KJS / Gradle: Add SCSS webpack configKT-51527 Kotlin/JS: BrowserXRun causes full-screen Webpack error “Compiled with problems: asset size limit/entrypoint size limit” for fresh Kotlin-React project from wizardKT-51532 Kotlin/JS: passing environment variable via Gradle script causes “Execution optimizations have been disabled” warningsKT-52221 Kotlin/JS: failed Node tests are not reported in a standard way
Tools. Gradle. Multiplatform
KT-52243 CInteropProcess is not cacheable despite the annotationKT-52741 MPP: klib outputs are not reproducibleKT-52208 MPP: Gradle plugin 1.7 doesn't support latest api versions (1.8, 1.9)KT-54071 MPP/AGP compatibility: Bump maxSupportedVersion to 7.3.0
Tools. Gradle. Native
KT-52632 Gradle / Native: commonizeNativeDistributionTask can never be up-to-dateKT-52328 “ld: framework not found SQLCipher” linkDebugTestIosSimulatorArm64 error
Tools. Incremental Compile
KT-53168 Incremental compilation doesn't perform correctly after a few iterationsKT-52925 [IR BE] Non incremental build occurs after build failure for compileKotlinJs taskKT-52946 CompileKotlinJs task is executed non-incrementally if there were changes made to the dependant moduleKT-52329 Reduce memory usage of classpath snapshot cacheKT-53266 Increment Compilation: “IllegalStateException: The following LookupSymbols are not yet converted to ProgramSymbols” when changing companion object constant fieldKT-53231 New IC reports build failures for missing classpath snapshots
Tools. JPS
KT-47824 ‘when expression must be exhaustive’ isn't thrown during incremental compilationKT-51873 JPS build is incorrect after gdw buildKTIJ-17072 JPS does not rebuild Kotlin usages of declared in Java when enum entry is addedKT-51537 Rebuild module on plugin classpaths change
Tools. REPL
KT-45065 REPL: Incorrect output for unsigned valueKT-53043 Scripting: Changes in REPL protocol: mark end of errors
Tools. Scripts
KT-52598 Scripts and REPL snippets are not checked against using ‘kotlin’ packageKT-47187 Kotlin ScriptEngine Failes to Compile a Trivial Statement After Failing to Compile a Broken OneKT-47191 [Kotlin Script Engine] Compiling Without Evaluating Leaves Engine in a Bad State
Tools. Kapt
KT-52761 Kotlin 1.7.0 breaks kapt processing for protobuf generated java sources
1.7.10
Compiler
KT-52702 Invalid locals information when compiling kotlinx.collections.immutable with Kotlin 1.7.0-RC2KT-52892 Disappeared specific builder inference resolution ambiguity errorsKT-52782 Appeared receiver type mismatch error due to ProperTypeInferenceConstraintsProcessing compiler featureKT-52718 declaringClass deprecation message mentions the wrong replacement in 1.7
IDE
Fixes
KTIJ-19088 KotlinUFunctionCallExpression.resolve() returns null for calls to @JvmSynthetic functionsKTIJ-19624 NoDescriptorForDeclarationException on iosTest.kt.vmKTIJ-21515 Load JVM target 1.6 as 1.8 in Maven projectsKTIJ-21735 Exception when opening a projectKTIJ-17414 UAST: Synthetic enum methods have null return valuesKTIJ-17444 UAST: Synthetic enum methods are missing nullness annotationsKTIJ-19043 UElement#comments is empty for a Kotlin property with a getterKTIJ-10031 IDE fails to suggest a project declaration import if the name clashes with internal declaration with implicit import from stdlib (ex. @Serializable)KTIJ-21151 Exception about wrong read access from “Java overriding methods searcher” with Kotlin overridesKTIJ-20736 NoClassDefFoundError: Could not initialize class org.jetbrains.kotlin.idea.roots.KotlinNonJvmOrderEnumerationHandler. Kotlin plugin 1.7 fails to startKTIJ-21063 IDE highlighting: False positive error “Context receivers should be enabled explicitly”KTIJ-20810 NoClassDefFoundError: org/jetbrains/kotlin/idea/util/SafeAnalyzeKt errors in 1.7.0-master-212 kotlin plugin on project openKTIJ-17869 KotlinUFunctionCallExpression.resolve() returns null for instantiations of local classes with default constructorsKTIJ-21061 UObjectLiteralExpression.getExpressionType() returns the base class type for Kotlin object literals instead of the anonymous class typeKTIJ-20200 UAST: @Deprecated(level=HIDDEN) constructors are not returning UMethod.isConstructor=true
IDE. Code Style, Formatting
KTIJ-20554 Introduce some code style for definitely non-null types
IDE. Completion
KTIJ-14740 Multiplatform declaration actualised in an intermediate source set is shown twice in a completion popup called in the source set
IDE. Debugger
KTIJ-20815 MPP Debugger: Evaluation of expect function for the project with intermediate source set may fail with java.lang.NoSuchMethodError
IDE. Decompiler, Indexing, Stubs
KTIJ-21472 “java.lang.IllegalStateException: Could not read file” exception on indexing invalid class fileKTIJ-20802 Definitely Not-Null types: “UpToDateStubIndexMismatch: PSI and index do not match” plugin error when trying to use library function with T&Any
IDE. FIR
KTIJ-20971 FIR IDE: “Parameter Info” shows parameters of uncallable methodsKTIJ-21021 FIR IDE: Completion of extension function does not work on nullable receiverKTIJ-21343 FIR IDE: Navigation from explicit invoke call does not workKTIJ-21013 FIR IDE: Inconsistent smartcasts highlightingKTIJ-21374 FIR IDE: Incorrect highlighting for operatorsKTIJ-20443 FIR IDE: Work in Dumb modeKTIJ-20852 FIR IDE: Exception when checking isInheritor on two classes in different modulesKTIJ-20637 FIR IDE: Strange exception while commenting-uncommenting FirReferenceResolveHelper.kt
IDE. Gradle Integration
KTIJ-21807 Gradle to IDEA import: language and API version settings are not imported for Native facetKTIJ-21692 Kotlin Import Test maintenance: 1.7.0-BetaKTIJ-20567 Kotlin/JS: Gradle import into IDEA creates no proper sub-modules, source sets, facets
IDE. Hints. Inlay
KTIJ-20552 Support definitely non-null types in inlay hints
IDE. Inspections and Intentions
New Features
KTIJ-18979 Quickfix for INTEGER_OPERATOR_RESOLVE_WILL_CHANGE to add explicit conversion callKTIJ-19950 Provide quickfixes for INVALID_IF_AS_EXPRESSION_WARNING and NO_ELSE_IN_WHEN_WARNINGKTIJ-19866 Create quick-fix for effective visibility error on private-in-file interface exposing private classKTIJ-19939 Provide quickfix for deprecated confusing expressions in when branches
Fixes
KTIJ-20705 Register quickfix for NO_CONSTRUCTOR_WARNING diagnosticKTIJ-21226 “Remove else branch” quick fix is not suggestedKTIJ-20981 Definitely non-null types: quick-fixes suggested incorrectly for LV=1.6 when Xenhance-type-parameter-types-to-def-not-null flag is setKTIJ-20953 Add quickfix for OVERRIDE_DEPRECATION warning to 1.7 - 1.9 migrationKTIJ-20734 Replace with [@JvmInline] value quick fix should be appliable on a whole projectKTIJ-21420 Add ‘else’ branch quick fix suggestion is displayed twice in case ‘if’ isn't completedKTIJ-21192 “Make protected” intention is redundant for interface propertiesKTIJ-18120 “Make public” intention does not add explicit “public” modifier when using ExplicitApi Strict modeKTIJ-20493 “Create expect” quick fix doesn't warn about platform-specific annotations
IDE. Misc
IDE. Native
KTIJ-21602 With Native Debugging Support plugin Gradle run configurations can't be executed from IDEA: LLDB_NATVIS_RENDERERS_ENABLED
IDE. Wizards
KTIJ-20919 Update ktor-html-builder dependency in kotlin wizardsKTIJ-20962 Wizard: Invalid Ktor imports
Tools. Gradle
KT-52777 ‘org.jetbrains.kotlinx:atomicfu:1.7.0’ Gradle 7.0+ plugin variant was published with missing classes
Tools. Gradle. JS
KT-52856 Kotlin/JS: Upgrade NPM dependencies
Tools. Gradle. Multiplatform
KT-52955 SourceSetMetadataStorageForIde: Broken ‘cleanupStaleEntries’ with enabled configuration caching or isolated ClassLoadersKT-52694 Kotlin 1.7.0 breaks Configuration Caching in Android projects
Tools. Incremental Compile
KT-52669 Full rebuild in IC exception recovery leaves corrupt IC data
Tools. JPS
KTIJ-17280 JPS: don't use java.io.File.createTempFile as it is not working sometimesKTIJ-20954 NPE at at org.jetbrains.kotlin.metadata.jvm.deserialization.JvmProtoBufUtil.readNameResolver on compiling by JPS with LV > 1.7
1.7.0
Analysis API. FIR
KT-50864 Analysis API: ISE: “KtCallElement should always resolve to a KtCallInfo” is thrown on call resolution inside plusAssign targetKT-50252 Analysis API: Implement FirModuleResolveStates for librariesKT-50862 Analsysis API: do not create use site subsitution override symbols
Analysis API. FIR Low Level API
KT-50729 Type bound is not fully resolvedKT-50728 Lazy resolve of extension function from ‘kotlin’ package breaks over unresolved typeKT-50271 Analysis API: get rid of using FirRefWithValidityCheck
Backend. Native. Debug
KT-50558 K/N Debugger. Error is not displayed in variables view for catch block
Compiler
New Features
KT-26245 Add ability to specify generic type parameters as not-nullKT-45165 Remove JVM target version 1.6KT-27435 Allow implementation by delegation to inlined value of inline classKT-47939 Support method references to functional interface constructorsKT-50775 Support IR partial linkage in Kotlin/Native (disabled by default)KT-51737 Kotlin/Native: Remove unnecessary safepoints on watchosArm32 and iosArm32 targetsKT-44249 NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER with type usage in higher order function
Performance Improvements
KT-48233 Switching to JVM IR backend increases compilation time by more than 15%KT-51699 Kotlin/Native: runtime has no LTO in debug binariesKT-34466 Use optimized switch over enum only when all entries are constant enum entry expressionsKT-50861 FIR: Combination of array set convention and plusAssign works exponentiallyKT-47171 For loop doesn't avoid boxing with value class iterators (JVM)KT-29199 ‘next’ calls for iterators of merged primitive progressive values are not specializedKT-50585 JVM IR: Array constructor loop should use IINCKT-22429 Optimize ‘for’ loop code generation for reversed arraysKT-50074 Performance regression in String-based ‘when’ with single equality clauseKT-22334 Compiler backend could generate smaller code for loops using range such as integer..array.size -1KT-35272 Unnecessary null check on unsafe cast after not-null assertion operatorKT-27427 Optimize nullable check introduced with ‘as’ cast
Fixes
KT-46762 Finalize support for jspecifyKT-51499 @file:OptIn doesn't cover override methodsKT-52037 FIR: add error in 1.7.0 branch if run with non-compatible pluginsKT-46756 Release the K2/JVM compiler in AlphaKT-49715 IR: “IllegalStateException: Function has no body: FUN name:toString” during IR lowering with shadowed extension inside interfaceKT-45508 False negative ABSTRACT_CLASS_MEMBER_NOT_IMPLEMENTED on a fake override with an abstract super class memberKT-28078 Report error “Public property exposes its private type” for primary constructor properties instead of warningKT-49017 Forbid usages of super or super if in fact it accesses an abstract memberKT-38078 Prohibit calling methods from Any with “super” qualifier once they are overridden as abstract in superclassKT-52363 Evaluate impact of qualified this behavior change warningsKT-52561 JVM: Coroutine state machine loses value after a check-induced smart castKT-52311 java.lang.VerifyError: Bad type on operand stackKT-41124 Inconsistency of exceptions at init block for an enum entry with and without a qualifier nameKT-46860 Make safe calls always nullableKT-52503 New green code appeared at the callable reference resolutionKT-51925 Native: “IllegalStateException: Symbol for kotlinx.cinterop/CStructVar|null[0] is unbound” caused by inline functionKT-49317 “IllegalStateException: Parent of this declaration is not a class: FUN LOCAL_FUNCTION_FOR_LAMBDA” with parameter of suspend type with the default parameterKT-51844 New errors in overload resolution involving vararg extension methodsKT-52006 “java.lang.Throwable: Unbalanced tree Exception” on indexing kotlin projectKT-51223 Report warning about conflicting inherited members from deserialized dependenciesKT-51439 FE 1.0: implement type variance conflict deprecation on qualifier type argumentsKT-51433 FE 1.0: implement warnings about label resolve changesKT-51317 Regression in resolution of lambdas where expected type has an extension receiver parameterKT-45935 JVM IR: Add not-null assertion for explicit definitely not-null parametersKT-51818 “ClassCastException: class CoroutineSingletons cannot be cast to class” with suspendCoroutineUninterceptedOrReturn and coroutinesKT-51718 JVM / IR: “VerifyError: Bad type on operand stack” caused by nullable variable inside suspend functionKT-51927 Native: The symbol of unexpected type encountered during IR deserialization error when multiple libraries have non-conflicting declarations with the same nameKT-52394 JVM: Missing annotation on method with value class return type when a subclass is present in the same file in Kotlin 1.7.0-BetaKT-51640 FIR: remove warning about “far from being production ready”KT-45553 FIR: support hiding declaration from star import by as importKT-52404 Prolong deprecation cycle for errors at contravariant usages of star projected argument from JavaKT-50734 TYPE_MISMATCH: NonNull parameter with a type of Nullable type argument causes compiler warningKT-51235 JVM / IR: “AbstractMethodError: Receiver class does not define or inherit an implementation of the resolved method” when property with inline class type is overridden to return Nothing?KT-48935 NI: Multiple generic parameter type constraints are not applied as expected when the parameter is of function typeKT-49661 NI: No TYPE_INFERENCE_UPPER_BOUND_VIOLATED when argument is inferred by return typeKT-50877 Inconsistent flexible typeKT-51988 “NPE: getContainingDeclaration…lDeclarationType.REGULAR) must not be null” when using @BuilderInference with multiple type argumentsKT-48890 Revert Opt-In restriction “Overriding methods can only have opt-in annotations that are present on their basic declarations.”KT-52035 FIR: add error in 1.7.0 branch if run on JS / Native configurationKT-45461 NI: False negative TYPE_INFERENCE_UPPER_BOUND_VIOLATED when passing an argument to a function with generic constraintsKT-52146 JVM IR: “AssertionError: Primitive array expected” on vararg of SAM types with self-type and star projectionKT-50730 Implement error for a super class constructor call on a function interface in supertypes listKT-52040 JVM: ClassFormatError Illegal method name “expectFailure$__proxy-0”KT-50845 Postpone rxjava errors reporting in the strict mode till 1.8 due to found broken casesKT-51979 “AssertionError: No modifier list, but modifier has been found by the analyzer” exception on incorrect Java interface overrideKT-51759 FIR DFA: false positive “Variable must be initialized”KT-50378 Unresolved reference for method in Jsoup library in a kts script fileKT-34919 “Visibility is unknown yet” when named parameter in a function type used in a typealias implemented by an abstract classKT-51893 Duplicated [OVERRIDE_DEPRECATION] on overridden propertiesKT-41034 K2: Change evaluation semantics for combination of safe calls and convention operatorsKT-51843 Functional interface constructor references are incorrectly allowed in 1.6.20 without any compiler flagsKT-51914 False positive RETURN_TYPE_MISMATCH in intellij ultimateKT-51711 Compiler warning is displayed in case there is ‘if’ else branch used with elvisKT-33517 Kotlin ScriptEngine does not respect async code when using bindingsKT-51850 FIR cannot resolve ambiguity with different SinceKotlin/DeprecatedSinceKotlinKT-44705 Deprecate using non-exhaustive if‘s and when’s in rhs of elvisKT-44510 FIR DFA: smartcast after elvis with escaping lambdaKT-44879 FIR DFA: Track inc and dec operator calls in preliminary loop visitorKT-51758 FIR: explicit API mode errors should not be reported for effectively internal / private entitiesKT-51203 FIR: Inconsistent RETURN_TYPE_MISMATCH and TYPE_MISMATCH reporting on functions and propertiesKT-51624 FIR: false-positive INAPPLICABLE_LATEINIT_MODIFIER for lateinit properties with unresolved typesKT-51204 FIR IC: Incremental compilation fails on nested crossinlineKT-51798 Fix ISE from IR backend when data class inherits equals/hashCode/toString with incompatible signatureKT-46187 FIR: OVERLOAD_RESOLUTION_AMBIGUITY on SAM-converted callable reference to List::plusKT-51761 Incorrect NONE_APPLICABLE in expect classKT-51756 FIR: false positive NO_VALUE_FOR_PARAMETER in expect class delegated constructor callKT-49778 Support cast to DefinitelyNotNull type in NativeKT-51441 -Xpartial-linkage option specified in Gradle build script is not passed to Native linkerKT-34515 NI: “AssertionError: Base expression was not processed: POSTFIX_EXPRESSION” with double not-null assertion to bracketsKT-48546 PSI2IR: “org.jetbrains.kotlin.psi2ir.generators.ErrorExpressionException: null: KtCallExpression” with recursive property access in lazy blockKT-28109 “AssertionError: No setter call” for incrementing parenthesized result of indexed access convention operatorKT-46136 Unsubstituted return type inferred for a function returning anonymous object upcast to supertypeKT-51364 FIR: ambiguity due to String constructors clashKT-51621 FIR: visible VS invisible qualifier conflictKT-50468 FIR compilers fails with CCE when meets top-level destructionKT-51557 Inline stack frame is not shown for default inline lambdaKT-51358 OptIn: show default warning/error message in case of empty message argumentKT-44152 FIR2IR fails on declarations from java stdlib if java classes are loaded from PSI instead of binariesKT-50949 PSI2IR: NSEE from ArgumentsGenerationUtilsKt.createFunctionForSuspendConversion with providing lambda as argument with suspend typeKT-39256 ArrayStoreException with list of anonymous objects with inferred types created in reified extension functionKT-39883 Deprecate computing constant values of complex boolean expressions in when condition branches and conditions of loopsKT-36952 Exception during codegen: cannot pop operand off an empty stack (reference equality, implicit boxing, type check)KT-51233 AssertionError in JavaLikeCounterLoopBuilder with ComposeKT-51254 Verify Error on passing null to type parameter extending inline classKT-50996 [FIR] Support Int -> Long conversion for property initializersKT-51000 [FIR] Support Int -> Long? conversionKT-51003 [FIR] Consider Int -> Long conversion if expected type is type variableKT-51018 [FIR] Wrong type inference if one of constraints is integer literalKT-51446 Metadata serialization crashes with IOOBE when deserializing underlying inline class value with type table enabledKT-50973 Redundant line number mapping for finally block with JVM IRKT-51272 Incompatible types: KClass and callable reference Collection::classKT-51274 “Expected some types” exception on when branch for when expression of erroneous typeKT-51229 FIR: private constructor of internal data class treated as internal and not privateKT-50750 [FIR] Report UNSUPPORTED on array literals not from annotation classesKT-51200 False EXPOSED_PARAMETER_TYPE for internal type parameter of internal typeKT-49804 False positive of UPPER_BOUND_VIOLATED and RETURN_TYPE_MISMATCHKT-51121 Inconsistent SAM behavior in multiple cases causing AbstractMethodError (Kotlin 1.6.10)KT-50136 FIR: syntax error on (T & Any)KT-49465 FIR2IR: support definitely not-null typesKT-51357 FIR: error in inference while using integer literal in expected Long positionKT-49925 [FIR] Incorrect builder inference (different cases)KT-50542 “IllegalStateException: Type parameter descriptor is not initialized: T declared in sort” with definitely non-null type Any & T in generic constraintKT-51171 FIR: class Error resolution problemKT-51156 Multiplatform linkDebugFramework task throws NoSuchElementException when expect class constructors utilize nested enum constantKT-51017 [FIR] Ambiguity on callable reference between two functions on generic receiver with different boundsKT-51007 [FIR] False positive ILLEGAL_SUSPEND_FUNCTION_CALL if fun interface with suspend function declared in another moduleKT-50998 [FIR] Int.inv() cal does not considered as compile time callKT-51009 [FIR] Incorrect inference of lambda in position of returnKT-50997 [FIR] Incorrect type of typealias for suspend functional typeKT-49714 Compiler reports “'operator modifier is inapplicable” if expect class with increment operator is provided via type aliasKT-48623 Type nullability enhancement improvementsKT-44623 “IllegalStateException: IdSignature is allowed only for PublicApi symbols” when suspending receiver is annotated with somethingKT-46000 JVM / IR: AssertionError on isSubtypeOfClass check in copyValueParametersToStatic with ComposeKT-50211 Annotation Instantiation with default arguments in NativeKT-49412 Controversial “type argument is not within its bounds” reported by FIRKT-48044 [FIR] Investigate behavior of UPPER_BOUND_VIOLATED on complex casesKT-37975 Don't show deprecation of enum class itself for its own memberKT-50737 Inheritance from SuspendFunction leads to compiler crashKT-50723 Implement a fix of reporting of uninitialized parameter in default values of parametersKT-50749 Implement UNSUPPORTED reporting on array literals inside objects in annotation classesKT-50753 Implement reporting errors on cycles in annotation parameter typesKT-50758 Fix inconsistency of exceptions at init block for an enum entry with and without a qualifier nameKT-50182 CONST_VAL_NOT_TOP_LEVEL_OR_OBJECT: clarify error message for const in object expressionKT-50183 Fix missing apostrophe escapes in compiler error messagesKT-50788 FIR: false unsafe call on not-null genericKT-50785 FIR: inconsistent smart cast after comparison with trueKT-50858 [FIR LL] FIR in low level mode creates multiple symbols for same declarationKT-50822 Analysis API: make declaration transformers machinery to be a thread safeKT-50972 FIR doesn't report VAL_REASSIGNMENT on synthetic propertiesKT-50969 FIR: diamond inheritance with different parameter types depends on a supertype orderKT-50875 FIR: no smart cast after reassignment with elvisKT-50835 Inline functions with suspend lambdas break the tail-call optimizationKT-49485 JVM / IR: StackOverflowError with long when-expression conditionsKT-35684 NI: “IllegalStateException: Expected some types” from builder-inference about intersecting empty types on trivial codeKT-50776 FIR: ambiguity between Sequence.forEach and Iterable.forEachKT-48908 Error for annotation on parameter type could have distinct ID and message referring 1.6KT-48907 SUPERTYPE_IS_SUSPEND_FUNCTION_TYPE error could have message referring version 1.6KT-50774 FIR2IR: NSEE in case of lambda in enum entry constructor callKT-49016 Drop QUALIFIED_SUPERTYPE_EXTENDED_BY_OTHER_SUPERTYPE diagnosticKT-34338 Parameterless main causes duplicate JVM signature errorKT-50577 JVM_IR: No NPE when casting uninitialized value of non-null type to non-null typeKT-50476 JVM_IR: NSME when calling ‘super.removeAt(Int)’ implemented in Java interface as a default methodKT-50257 JVM_IR: Incorrect bridge delegate signature for renamed remove(I) causes SOE with Kotlin class inherited from fastutils IntArrayListKT-50470 FIR: inapplicable candidate in delegate inference due to nullabilityKT-32744 Inefficient compilation of null-safe call (extra null checks, unreachable code)
Docs & Examples
KT-52032 Document performance optimizations of the Kotlin/JVM compiler in 1.7.0KT-49424 Update KEEP for OptIn
IDE
Fixes
KTIJ-21735 Exception when opening a projectKTIJ-17414 UAST: Synthetic enum methods have null return valuesKTIJ-17444 UAST: Synthetic enum methods are missing nullness annotationsKTIJ-19043 UElement#comments is empty for a Kotlin property with a getterKTIJ-10031 IDE fails to suggest a project declaration import if the name clashes with internal declaration with implicit import from stdlib (ex. @Serializable)KTIJ-21515 Load JVM target 1.6 as 1.8 in Maven projectsKTIJ-21151 Exception about wrong read access from “Java overriding methods searcher” with Kotlin overridesKTIJ-20736 NoClassDefFoundError: Could not initialize class org.jetbrains.kotlin.idea.roots.KotlinNonJvmOrderEnumerationHandler. Kotlin plugin 1.7 fails to startKT-50111 Resolving into KtUltraLightMethodKTIJ-21063 IDE highlighting: False positive error “Context receivers should be enabled explicitly”KTIJ-20810 NoClassDefFoundError: org/jetbrains/kotlin/idea/util/SafeAnalyzeKt errors in 1.7.0-master-212 kotlin plugin on project openKTIJ-19088 KotlinUFunctionCallExpression.resolve() returns null for calls to @JvmSynthetic functionsKTIJ-17869 KotlinUFunctionCallExpression.resolve() returns null for instantiations of local classes with default constructorsKTIJ-21061 UObjectLiteralExpression.getExpressionType() returns the base class type for Kotlin object literals instead of the anonymous class typeKTIJ-20200 UAST: @Deprecated(level=HIDDEN) constructors are not returning UMethod.isConstructor=trueKTIJ-19624 NoDescriptorForDeclarationException on iosTest.kt.vm
IDE. Code Style, Formatting
KTIJ-20554 Introduce some code style for definitely non-null types
IDE. Completion
KTIJ-14740 Multiplatform declaration actualised in an intermediate source set is shown twice in a completion popup called in the source set
IDE. Debugger
KTIJ-20815 MPP Debugger: Evaluation of expect function for the project with intermediate source set may fail with java.lang.NoSuchMethodError
IDE. Decompiler, Indexing, Stubs
KTIJ-21472 “java.lang.IllegalStateException: Could not read file” exception on indexing invalid class fileKTIJ-20802 Definitely Not-Null types: “UpToDateStubIndexMismatch: PSI and index do not match” plugin error when trying to use library function with T&AnyKT-51248 Function and parameter names with special symbols have to backticked
IDE. FIR
KTIJ-20443 FIR IDE: Work in Dumb modeKTIJ-21374 FIR IDE: Incorrect highlighting for operatorsKTIJ-21013 FIR IDE: Inconsistent smartcasts highlightingKTIJ-21343 FIR IDE: Navigation from explicit invoke call does not workKTIJ-20852 FIR IDE: Exception when checking isInheritor on two classes in different modulesKTIJ-21021 FIR IDE: Completion of extension function does not work on nullable receiverKTIJ-20637 FIR IDE: Strange exception while commenting-uncommenting FirReferenceResolveHelper.ktKTIJ-20971 FIR IDE: “Parameter Info” shows parameters of uncallable methods
IDE. Gradle Integration
KTIJ-21807 Gradle to IDEA import: language and API version settings are not imported for Native facetKTIJ-21692 Kotlin Import Test maintenance: 1.7.0-BetaKTIJ-20567 Kotlin/JS: Gradle import into IDEA creates no proper sub-modules, source sets, facets
IDE. Hints. Inlay
KTIJ-20552 Support definitely non-null types in inlay hints
IDE. Inspections and Intentions
New Features
KTIJ-18979 Quickfix for INTEGER_OPERATOR_RESOLVE_WILL_CHANGE to add explicit conversion callKTIJ-19950 Provide quickfixes for INVALID_IF_AS_EXPRESSION_WARNING and NO_ELSE_IN_WHEN_WARNINGKTIJ-19866 Create quick-fix for effective visibility error on private-in-file interface exposing private classKTIJ-19939 Provide quickfix for deprecated confusing expressions in when branches
Fixes
KTIJ-20705 Register quickfix for NO_CONSTRUCTOR_WARNING diagnosticKTIJ-21226 “Remove else branch” quick fix is not suggestedKTIJ-20981 Definitely non-null types: quick-fixes suggested incorrectly for LV=1.6 when Xenhance-type-parameter-types-to-def-not-null flag is setKTIJ-20953 Add quickfix for OVERRIDE_DEPRECATION warning to 1.7 - 1.9 migrationKTIJ-20734 Replace with [@JvmInline] value quick fix should be appliable on a whole projectKTIJ-21420 Add ‘else’ branch quick fix suggestion is displayed twice in case ‘if’ isn't completedKTIJ-21192 “Make protected” intention is redundant for interface propertiesKTIJ-18120 “Make public” intention does not add explicit “public” modifier when using ExplicitApi Strict modeKTIJ-20493 “Create expect” quick fix doesn't warn about platform-specific annotations
IDE. Misc
IDE. Multiplatform
KT-49523 Improve environment setup experience for KMM projectsKT-50952 MPP: Commonized cinterops doesn't attach/detach to source set on configuration changes
IDE. Native
KT-44329 Improve UX of using Native libraries in KotlinKTIJ-21602 With Native Debugging Support plugin Gradle run configurations can't be executed from IDEA: LLDB_NATVIS_RENDERERS_ENABLED
IDE. Wizards
KTIJ-20919 Update ktor-html-builder dependency in kotlin wizardsKTIJ-20962 Wizard: Invalid Ktor imports
JavaScript
New Features
KT-51735 KJS / IR: Minimize member names in production mode
Performance Improvements
KT-51127 Kotlin/JS - IR generates plenty of useless Unit_getInstance()KT-50212 KJS IR: Upcast should be a no-opKT-16974 JS: Kotlin.charArrayOf is suboptimal due to Rhino bugs
Fixes
KT-44319 JS IR BE: Add an ability to generate separate JS files for each moduleKT-52518 Kotlin/JS IR: project with 1.6.21 fails to consume library built with 1.7.0-RC: ISE “Unexpected IrType kind: KIND_NOT_SET” at IrDeclarationDeserializer.deserializeIrTypeData()KT-52010 K/JS IR: both flows execute when using elvis operatorKT-41096 KJS IR: @JsExport should use original js name for external declarationsKT-52144 KJS / IR: Missing property definitions for interfaced defined propertiesKT-52252 KJS / IR: overridden properties are undefined/nullKT-51973 KJS / IR overridden properties of inherited interface missingKT-51125 Provide a way to use import keyword in js expressionsKT-40888 KJS / IR: Missing methods are no longer generated (polyfills)KT-50504 KJS / IR: Transpiled JS incorrectly uses the unscrambled names of internal fieldsKT-51853 JS compilation fails with “Uninitialized fast cache info” errorKT-51205 K/JS IR: external class is mapped to anyKT-50806 Typescript definitions contain invalid nested block comments with generic parent and type argument without @JsExportKT-51841 KJS / IR: No flat hash for FUN FAKE_OVERRIDE with kotlin.incremental.js.ir=trueKT-51081 KJS / IR + IC: Passing an inline function with default params as a param to a higher-order function crashes the compilerKT-51084 KJS / IR + IC: Cache invalidation doesn't check generic inline functions reified qualifierKT-51211 K/JS IR: JsExport: Can't export nested enumKT-51438 KJS / IR: Duplicated import names for the same external namesKT-51238 Kotlin/JS: IR + IC: build fails after clean on compileTestDevelopmentExecutableKotlinJs task: “Failed to create MD5 hash for file ‘.../build/classes/kotlin/main’ as it does not exist”KT-50674 KJS / IR: JS code cannot modify local variableKT-50953 KJS IR: Incorrect nested commenting in d.tsKT-15223 JS: function that overrides external function with vararg parameter is translated incorrectlyKT-50657 KJS / IR 1.6.20-M1-39 - Date in Kotlin JS cannot be created from long.
Language Design
New Features
KT-45618 Stabilize builder inferenceKT-30485 Underscore operator for type argumentsKT-49006 Support at least three previous versions of language/APIKT-16768 Context-sensitive resolution prototype (Resolve unqualified enum constants based on expected type)KT-14663 Support having a “public” and a “private” type for the same propertyKT-50477 Functional conversion does not work on suspending functionsKT-32162 Allow generics for inline classes
Fixes
KT-12380 Support sealed (exhaustive) whensKT-27750 Reverse reservation of ‘yield’ as keywordKT-22956 Release OptIn annotationsKT-44866 Change behavior of private constructors of sealed classesKT-49110 Prohibit access to members of companion of enum class from initializers of entries of this enumKT-29405 Switch default JVM target version to 1.8
Libraries
New Features
KT-50484 Extensions for java.util.Optional in stdlibKT-50146 Reintroduce min/max(By/With) operations on collections with non-nullable return typeKT-46132 Specialized default time source with non-allocating time marksKT-41890 Support named capture groups in Regex on NativeKT-48179 Introduce API to retrieve the number of CPUs the runtime has
Performance Improvements
KT-42178 Range and Progression should override last()
Fixes
KT-42436 Support java.nio.Path extension in the standard libraryKT-51470 Stabilize experimental API for 1.7KT-51775 JS: Support named capture groups in RegexKT-51776 Native: Support back references to groups with multi-digit indexKT-51082 Introduce Enum.declaringJavaClass propertyKT-51848 Promote deepRecursiveFunction to stable APIKT-48924 KJS: toString in base 36 produces different results in JS compare to JVMKT-50742 Regular expression is fine on jvm but throws PatternSyntaxException for native macosX64 targetKT-50059 Stop publishing kotlin-stdlib and kotlin-test artifacts under modular classifierKT-26678 Rename buildSequence/buildIterator to sequence/iterator
Native
KT-49406 Kotlin/Native: generate standalone executable for androidNative targets by defaultKT-48595 Enable Native embeddable compiler jar in Gradle plugin by defaultKT-51377 Native: synthetic forward declarations are preferred over commonized definitionsKT-49145 Kotlin/Native static library compilation fails for androidNative*KT-49496 Gradle (or the KMM plugin) is caching the Xcode Command Line Tools locationKT-49247 gradle --offline should translate into airplaneMode for kotin-native compiler
Native. Build Infrastructure
KT-52259 kotlin-native releases from GitHub don't contain platform libs
Native. C and ObjC Import
KT-49455 Methods from Swift extensions are not resolved in Kotlin shared moduleKT-50648 Incorrect KMM cinterop conversion
Native. ObjC Export
KT-50982 RuntimeAssertFailedPanic in iOS when Kotlin framework is initialized before loadingKT-49937 Kotlin/Native 1.5.31: ‘runtime assert: Unexpected selector clash’ when ‘override fun toString(): String’ is used
Native. Platforms
KT-52232 Kotlin/Native: simplify toolchain dependency override for MinGW
Native. Runtime
KT-52365 Kotlin/Native fails to compile projects for 32-bit targets when new memory manager is enabled
Native. Runtime. Memory
KT-48537 Kotlin/Native: improve GC triggers in the new MM.KT-50713 Kotlin/Native: Enable Concurrent Sweep GC by default
Native. Stdlib
KT-50312 enhancement: kotlin native -- add alloc<TVarOf>(T)
Native. Testing
KT-50316 Kotlin/Native: Produce a list of available tests alongside the final artifactKT-50139 Create tests for Enter/Leave frame optimization
Reflection
KT-27598 “KotlinReflectionInternalError” when using callBy on constructor that has inline class parametersKT-31141 IllegalArgumentException when reflectively accessing nullable property of inline class type
Tools. CLI
KT-52409 Report error when use-k2 with MultiplatformKT-51717 IllegalArgumentException: Unexpected versionNeededToExtract (0) in 1.6.20-RC2 with useFir enabledKT-52217 Rename ‘useFir’ to ‘useK2’KT-29974 Add a compiler option ‘-Xjdk-release’ similar to javac's ‘--release’ to control the target JDK versionKT-51673 Make language version description not in capital lettersKT-48833 -Xsuppress-version-warnings allows to suppress errors about unsupported versionsKT-51627 kotlinc fails with java.lang.RuntimeException if /tmp/build.txt file exists on the diskKT-51306 Support reading language settings from an environment variable and overriding the current settings by themKT-51093 “-Xopt-in=...” command line argument no longer works
Tools. Commonizer
KT-43309 Overwrite return type and parameter types of callable member to succeed commonizationKT-52050 [Commonizer] ‘platform.posix.DIR’ not implementing ‘CPointed’ when commonized for ‘nativeMain’ on linux or windows hostsKT-51224 MPP: For optimistically commonized numbers missed kotlinx.cinterop.UnsafeNumberKT-51215 MPP: Update Kdoc description for kotlinx.cinterop.UnsafeNumberKT-51686 Cinterop: Overload resolution ambiguity in 1.6.20-RC2KT-46636 HMPP: missed classes from platform.posix.*KT-51332 Optimistic number commonization is disabled by default in KGP with enabled HMPP
Tools. Compiler Plugins
KT-50992 jvm-abi-gen breaks inline functions in inline classes with private constructors in Kotlin 1.6.20
Tools. Daemon
KT-32885 KT. Kotlin daemon compilation process is broken: java.lang.IllegalStateException Service is dying at entities generation by Kotlin.kts script
Tools. Gradle
New Features
KT-49227 Support Gradle plugins variantsKT-50869 Provide API that allow AGP to set up Kotlin compilationKT-48008 Consider offering a KotlinBasePluginKT-52030 Provide experimental possibility to view internal information about Kotlin Compiler performance
Performance Improvements
KT-52141 Optimize Java class snapshotting for the kotlin.incremental.useClasspathSnapshot featureKT-51978 Optimize classpath snapshot cache for the kotlin.incremental.useClasspathSnapshot featureKT-51326 Kotlin-gradle-plugin performance issue with mass java SourceRoots
Fixes
KT-52448 Compilation tasks are missing input/output/internal annotations on includes/excludes propertiesKT-52239 Type based task configuration-blocks for JVM stopped working in GradleKT-52313 No recompilation in Gradle after adding or removing function parameters, removing functions (and maybe more) in dependent modulesKT-51854 Add Ktor to gradle performance benchmarkKT-52086 Rename flag ‘use-fir’ to ‘use-k2’KT-52509 Main variant published to Gradle plugin portal uses unshadowed artifactKT-52392 Gradle: 1.7.0 does not support custom gradle build configuration on Windows OSKT-32805 KotlinCompile inherits properties sourceCompatibility and targetCompatibility which breaks Gradle's incremental compilationKT-52189 Provide Gradle Kotlin/DSL friendly deprecated classpath property in KotlinCompiler taskKT-51415 Confusing build failure reason is displayed in case kapt is used and different JDKs are used for compileKotlin and compileJava tasksKT-52187 New IC can not be enabled in an Android project using kaptKT-51898 Upgrading Kotlin/Kotlin Gradle plugin to 1.5.3 and above breaks ‘com.android.asset-pack’ pluginKT-51913 Gradle plugin should not add attributes to the legacy configurationsKT-34862 Restoring from build cache breaks Kotlin incremental compilationKT-45777 New IC in GradleKT-51360 Show performance difference in percent between releasesKT-51380 Add open-source project using Kotlin/JS plugin to build regression benchmarksKT-51937 Toolchain usage with configuration cache prevents KotlinCompile task to be UP-TO-DATEKT-48276 Remove kotlin2js and kotlin-dce-pluginKT-52138 KSP could not access internal methods/properties in Kotlin Gradle PluginKT-51342 Set minimal supported Android Gradle plugin version to 3.6.4KT-50494 Remove kotlin.experimental.coroutines Gradle DSL optionKT-49733 Bump minimal supported Gradle version to 6.7.1KT-48831 Remove ‘KotlinGradleSubplugin’KT-47924 Remove annoying cast in toolchain extension method for Kotlin DSLKT-46541 Fail Gradle builds when deprecated kotlinOptions.jdkHome is setKT-51830 Gradle: deprecate kotlin.compiler.execution.strategy system propertyKT-47763 Gradle DSL: Remove deprecated useExperimentalAnnotation and experimentalAnnotationInUseKT-51374 NoSuchFileException in getOrCreateSessionFlagFile()KT-51837 kotlin-gradle-plugin:1.6.20 fails xray scan on shadowed Gson 2.8.6.KT-51454 KotlinJvmTest is not a cacheable taskKT-45745 Migrate only Kotlin Gradle Plugin tests to new JUnit5 DSL and run them separately on CIKT-47318 Remove deprecated ‘kotlinPluginVersion’ property in `KotlinBasePluginWrapper'KT-51378 Gradle ‘buildSrc’ compilation fails when newer version of Kotlin plugin is added to the build script classpathKT-46038 Gradle: kotlin_module files are corrupted in the KotlinCompile output, and gets cachedKT-51064 Kotlin gradle build hangs on MetricsContainer.flushKT-48779 Gradle: Could not connect to kotlin daemon
Tools. Gradle. Cocoapods
KT-50622 Cocoapods Plugin: cocoapods-generate does not work correctly with ruby 3.0.0 and higherKT-51861 Custom binary name in CocoaPods plugin isn't respected by fatFramework task
Tools. Gradle. JS
KT-52221 Kotlin/JS: failed Node tests are not reported in a standard wayKT-51895 K/JS: Redundant technical messages during JS testsKT-51414 Allow set up environment variables for JS testsKT-51623 Kotlin/JS: Mocha could not failed when external module not foundKT-51503 Update NPM dependency versions
Tools. Gradle. Multiplatform
New Features
KT-51386 [KPM] IdeaKotlinProjectModelBuilder: Implement dependencies
Fixes
KT-49524 Improve DSL for managing Kotlin/Native binary outputKT-51765 com.android.lint in multiplatform project without android target should not trigger warningKT-38456 MPP with Android source set: allTests task does not execute Android unit testsKT-44227 Common tests are not launched on local JVM for Android via allTests task in a multiplatform projectKT-51946 Temporarily mark HMPP tasks as notCompatibleWithConfigurationCache for Gradle 7.4KT-52140 Support extensibility Kotlin Artifacts DSL by external gradle pluginsKT-51947 Mark HMPP tasks as notCompatibleWithConfigurationCache for Gradle 7.4 using ReflectionKT-50925 Could not resolve all files for configuration ‘:metadataCompileClasspath’KT-51262 [KPM] IDEA import: Move model builder to KGPKT-51220 [KPM][Android] Implement generic data storage and import pipelineKT-48649 No run task generated for macosArm64 target in Gradle plugin
Tools. Gradle. Native
KT-47746 Allow customization of the Kotlin/Native compiler download urlKT-51884 Gradle Native: “A problem occurred starting process ‘command ‘xcodebuild’’” when building assembleFooXCFramework task on Linux
Tools. Incremental Compile
KT-51546 FIR incremental compilation fails with assertion “Trying to inline an anonymous object which is not part of the public ABI”KT-49780 IncrementalCompilerRunner bug: Outputs are deleted after successful rebuild following fallback from an exceptionKT-44741 Incremental compilation: inspectClassesForKotlinIC doesn't determine changes with imported constant
Tools. JPS
KTIJ-17280 JPS: don't use java.io.File.createTempFile as it is not working sometimesKTIJ-20954 NPE at at org.jetbrains.kotlin.metadata.jvm.deserialization.JvmProtoBufUtil.readNameResolver on compiling by JPS with LV > 1.7
Tools. Kapt
KT-49533 Make kapt work out of the box with latest JDKsKT-52284 FIR: add error in 1.7.0 branch if run with KaptKT-51463 KAPT: Incremental compilation not working when rerunning unit testsKT-51132 KAPT: Support reporting the number of generated files by each annotation processorKT-30172 Kapt: Shutdown kotlinc gracefully in case of error in annotation processor
Tools. Scripts
KT-49173 Add support for nullable types in provided properties and other configuration-defined declarationsKT-52294 [Scripting] Update oudated org.eclipse.aether dependencies to new org.apache.maven.resolverKT-51213 Kotlin JSR223 crashes with “ScriptException: ERROR java.lang.NullPointerException:” if bindings contain one or more null valuesKT-48812 Script: “IllegalStateException: unknown classifier kind SCRIPT” when passing a function reference to a FlowKT-50902 Scripts loaded from the compilation cache ignore the loadDependencies eval configuration propertyKT-52186 Scripts: Backend Internal error: Exception during IR lowering when using symbol from a dependency inside a functionKT-51731 Script: jsr223 memory leak in spring-boot Fat JarKT-49258 Scripts: method ‘void ()’ not found with multiple evals using kotlin script JSR223KT-51346 Scripts: “BackendException: Exception during IR lowering” with variable of imported script inside class