CHANGELOG
1.3.70
Compiler
New Features
KT-7745
Support named arguments in their own position even if the result appears as mixedKT-34847
Lift restrictions from kotlin.Result
Performance Improvements
KT-14513
Suboptimal compilation of lazy delegated properties with inline getValue
Fixes
KT-19234
Improve “Supertypes of the following classes cannot be resolved” diagnosticKT-21178
Prohibit access of protected members inside public inline membersKT-24461
Expect interface with suspend function with default arguments causes runtime errorKT-25514
Support usage of function reference with vararg where function of array is expected in new inferenceKT-26435
Bad frame merge after inlineKT-27825
Gradually prohibit non-abstract classes containing abstract members invisible from that classes (internal/package-private)KT-27999
Generic type is fixed too early for lambda argumentsKT-28940
Concurrency issue for lazy values with the post-computation phaseKT-29242
Conditional with generic type Nothing inside inline function throws java.lang.VerifyError: Bad return type
KT-30244
Unable to infer common return type for two postponed argumentsKT-30245
Wrong type is inferred for lambda if it has expected type with an extension receiverKT-30277
Relax the “no reflection found in class path” warning for KType and related APIKT-30744
Invoking Interface Static Method from Extension method generates incorrect jvm bytecodeKT-30953
Missing unresolved if callable reference is used in the place in which common super type is computingKT-31227
Prohibit using array based on non-reified type parameters as reified type arguments on JVMKT-31653
Incorrect transformation of the try-catch cover when inliningKT-31975
No diagnostic on error typeKT-32106
New type inference algorithm: IDE shows error but the code compiles succesfullyKT-32138
New type inference: invoking type-aliased extension function red in IDE, but compilesKT-32168
Problem in IDE with new type inference and delegate providerKT-32243
New type inference failsKT-32345
New type inference error when using helper method to create delegate providerKT-32415
Type mismatch on argument of super constructor of inner class callKT-32423
NI: IllegalStateException: Error type encountered: org.jetbrains.kotlin.types.ErrorUtils$UninferredParameterTypeConstructor@211a538e (ErrorType)KT-32456
NI: “IllegalStateException: Error type encountered” when adding emptyList to mutableListKT-32499
Kotlin/JS - new type inference with toTypedArray() failureKT-32742
Gradle/JS “Unresolved Reference” when accessing setting field of Dynamic object w/ ReactKT-32818
Type inference failed with elvis operatorKT-32862
NI: Compilation error “IllegalArgumentException: ClassicTypeSystemContextForCS couldn't handle” with overloaded generic extension function reference passed as parameterKT-33033
NI: Nothing incorrectly inferred as return type when null passed to generic function with expression if statement bodyKT-33197
Expression with branch resolving to List<…> ultimately resolves to MutableList<…>KT-33263
“IllegalStateException: Type variable TypeVariable(T) should not be fixed!” with generic extension function and in varianceKT-33592
NI: Missed error in IDE — Unsupported [Collection literals outside of annotations]KT-33932
Compiler fails when it encounters inaccessible classes in javac integration modeKT-34029
StackOverflowError for access to nested object inheriting from containing generic class at org.jetbrains.kotlin.descriptors.impl.LazySubstitutingClassDescriptor.getTypeConstructor
KT-34282
Missing diagnostic of unresolved for callable references with overload resolution ambiguityKT-34391
IDE, NI: False negative EXPERIMENTAL_API_USAGE_ERROR with callable referenceKT-34500
CompilationException when loop range is DoubleArray and loop parameter is casted to super-type (e.g. Any, Number, etc.)KT-34647
Gradually rename experimentality annotationsKT-34649
Deprecate -Xexperimental flagKT-34743
Support trailing comma in the compilerKT-34786
Flaky type inference for lambda expressionsKT-34820
NI: Red code when expanding type-aliased extension function in LHS position of elvisKT-35101
“AssertionError: Mapping ranges should be presented in inline lambda” with a callable reference argument to inline lambdaKT-35168
NI: “UninitializedPropertyAccessException: lateinit property subResolvedAtoms has not been initialized”KT-35172
NI: False positive type mismatch if nullable type after elvis and safe call inside lambda is returning (expected type is specified explicitly)KT-35224
NI: Java call candidate with varargs as Array isn't present if SAM type was used in this callKT-35426
IncompatibleClassChangeError: Method 'int java.lang.Object.hashCode()' must be Methodref constant
when invoking on super with explicit generic type
Docs & Examples
KT-31118
Provide missing documentation for StringBuilder members
IDE
New Features
KT-27496
Color Scheme: allow changing style for suspend function callsKT-30806
Add IntelliJ Color Scheme rules for property declarationsKT-34303
IDE should suggest to import an extension iterator function when using for loop with a rangeKT-34567
Feature: Auto add val keyword on typing data/inline class ctor parametersKT-34667
Add auto-import quickfix for overloaded generic function
Performance Improvements
KT-30726
Editor is laggy if the code below a current line has unresolved referenceKT-30863
IDE freeze on editing with “Add unambiguous imports on the fly” turned onKT-32868
Provide incremental analysis of file when it is applicableKT-33250
KtLightClassForSourceDeclaration.isFinal() can be very slow (with implications for class inheritor search)KT-33905
Optimize imports under reasonable progressKT-34956
UI Freeze: PlainTextPasteImportResolverKT-35121
Add support for KtSecondaryConstructors into incremental analysisKT-35189
Support incremental analysis of comment and kdocKT-35590
UI freeze in kotlin.idea.core.script.ScriptConfigurationMemoryCache when editing file
Fixes
KT-10478
Move-statement doesn't work for methods with single-expression body and lambda as returning typeKT-13344
Reduce visual distraction of val keywordKT-14758
Move statement up shouldn't move top level declarations above package and import directivesKT-23305
We should be able to see platform-specific errors in common moduleKT-27806
UAST: @Deprecated(level=DeprecationLevel.HIDDEN) makes method disappearKT-28708
Java IDE fails to understand @JvmDefault on properties from binariesKT-30489
Kotlin functions are represented in UAST as UAnnotationMethodsKT-31037
Lambda expression default parameter ‘it’ sometimes is not highlighted in a call chainKT-31365
IDE does not resolve references to stdlib symbols in certain packages (kotlin.jvm) when using OSGi bundleKT-32031
UAST: Method body missing for suspend functionsKT-32540
UltraLight support for compiler pluginsKT-33888
Bad indentation when copy-paste to trimIndent()KT-34081
Kotlin constants used in Java annotation attributes trigger “Attribute value must be constant” errorKT-34316
UAST: reified methods no longer visible in UASTKT-34337
Descriptors Leak in UltraLightClassesKT-34379
“Implement members” with unspecified type argument: “AssertionError: 2 declarations in override fun”KT-34785
Enter handler: do not add ‘trimIndent()’ in constKT-34914
Analysis sometimes isn't rerun until an out of code block changeKT-35222
SQL language is not injected to String array attribute of Java annotationKT-35266
Kotlin-specific setting “Optimize imports on the fly” is uselessKT-35454
Weird implementation of KtUltraLightFieldImpl.isEquivalentTo
IDE. Code Style, Formatting
New Features
KT-35088
Insert empty line between a declaration and declaration with commentKT-35106
Insert an empty line between a declaration and declaration with annotation
Fixes
KT-4194
Code formatter should not move the end of line comment after if
condition to the next lineKT-12490
Formatter inserts empty line between single-line declarations in the presence of a commentKT-22273
Labeled statements are formatted incorrectlyKT-22362
Formatter breaks up infix function used in elvis operatorKT-23811
Formatter: Constructor parameters are joined with the previous line if prefixed with an annotationKT-23929
Formatter: chained method calls: “Chop down if long” setting is ignoredKT-23957
Formatter tears comments away from file annotationsKT-30393
Remove unnecessary whitespaces between property accessor and its parameter list in formatterKT-31881
Redundant indent for single-line comments inside lambdaKT-32277
Space before by delegate keyword on a property is not formattedKT-32324
Formatter doesn't insert space after safe cast operator as?
KT-33553
Formater does not wrap function chained expression body despite “chained function calls” settingsKT-34049
Formatter breaks string inside template expression with elvis operatorKT-35093
Formatter inserts empty line between single-line declarations in the presence of an annotationKT-35199
Wrong formatting for lambdas in chain calls
IDE. Completion
Fixes
KT-15286
Support import auto-completion for extension functions declared in objectsKT-25732
“null” keyword should have priority in completion sortKT-29926
Suggest lambda parameter names in IDE to improve DSL adoptionKT-31762
Completion: Parameter name is suggested instead of enum entry in entry constructorKT-32615
PIEAE for smart completion of anonymous function with importing name inside of functionKT-33979
No completion for functions from nested objectsKT-34150
No completion for object methods that override somethingKT-34386
Typo in Kotlin arg postfix completionKT-34414
Completion works differently for suspend and regular lambda functionsKT-34644
Code completion list sorting: do not put method before “return” keywordKT-35042
Selecting completion variant works differently for suspend and regular lambda parameter
IDE. Debugger
KT-12242
Debugger: breakpoint in a class is not hit if the class was first accessed in Evaluate ExpressionKT-20342
Step Over jumps to the wrong position (KotlinUFile)KT-30909
“Kotlin variables” button looks inconsistent with panel styleKT-32704
ISE "Descriptor can be left only if it is last "on calling function with expression body inside Evaluate Expression windowKT-32736
Evaluate Expression on statement makes error or shows nothingKT-32741
"Anonymous functions with names are prohibited "on evaluating functions in Expression modeKT-33303
“Smart step into” doesn't work for library declarationsKT-33304
Can't put a breakpoint to the first line in a fileKT-33728
Smart Step Into doesn't work for @InlineOnly functionsKT-35316
IndexNotReadyException on function breakpoint
IDE. Folding
KT-6316
Folding of multiline functions which don't have curly braces (expression-body functions)
IDE. Gradle. Script
KT-31976
Adding a space in build.gradle.kts leads to ‘Gradle projects need to be imported’ notificationKT-34441
*.gradle.kts: load all scripts configuration at project importKT-34442
*.gradle.kts: avoid just-in-case script configuration request to GradleKT-34530
Equal duplicate script definitions are listed three times in PreferencesKT-34740
Implement completion for implicit receivers in scripts with new scripting APIKT-35096
Duplicated “Kotlin Script” definition for Gradle/Kotlin projectsKT-35149
build.graldle.kts settings importing: configuration for buildSrc/prepare-deps/build.gradle.kts not loadedKT-35205
*.gradle.kts: avoid just-in-case script configuration request to Gradle while loading from FS
IDE. Hints. Parameter Info
KT-34992
UI Freeze: Show parameter info leads to freezes
IDE. Inspections and Intentions
New Features
KT-8478
Make ‘Add parameter to function’ quick fix work to parameters other than lastKT-12073
Report IDE inspection warning on pointless unary operators on numbersKT-18536
Provide proper quick fix for accidental override errorKT-34218
Merge ‘else if’ intention
Fixes
KT-17659
Cannot access internal Kotlin declaration from Java test code within the same moduleKT-25271
“Remove redundant ‘.let’ call” may introduce expression side effects several timesKT-29737
“Make internal/private/protected” intention works for either expect
or actual
sideKT-31967
Typo in inspection name: “‘+=’ create new list under the hood”KT-32582
Ambiguous message for [AMBIGUOUS_ACTUALS] error (master)KT-33109
“Add constructor parameters” quick fix should add default parameters from super classKT-33123
False positive “Redundant qualifier name” with inner class as constructor parameter for outerKT-33297
Improve parameter name in Add parameter to constructor
quick fixKT-33526
False positive “Redundant qualifier name” with enum constant initialized with companion object fieldKT-33580
False positive “Redundant visibility modifier” overriding property with protected set visibilityKT-33796
INVISIBLE_SETTER: quick fix “Make ‘’ public” does not remove redundant setterKT-33902
False positive for “Remove explicit type specification” with type alias as return typeKT-33933
“Create expect” quick fix generates the declaration in a default source set even if an alternative is chosenKT-34078
ReplaceWith does not work if replacement is fun in companion objectKT-34203
“Add constructor parameter” fix does not add genericsKT-34297
“Add ‘replaceWith’ argument” inserts positional instead of named argumentKT-34325
“Control flow with empty body” inspection should not report ifs with commentsKT-34411
Create expect/actual quick fix: focus is lost in the editor (193 IDEA)KT-34432
Replace with safe call intention inserts redundant elvis operatorKT-34603
“Remove redundant ‘.let’ call” false negative for reference expressionKT-34694
“Terminate preceding call with semicolon” breaks lambda formattingKT-34784
“Indent raw string” intention: do not suggest in constKT-34894
Action “Add not-null asserted (!!) call” doesn't fix error for properties with omitted this
KT-35022
Quickfix “change to var” doesn't remove const
modifierKT-35208
NPE from PerModulePackageCacheServiceKT-35288
False positive “Remove braces from ‘when’ entry” in ‘when’ expression which returns lambda
IDE. Navigation
KT-30736
References for import alias from kotlin library not found using ReferencesSearch.search
IDE. Refactorings
KT-18191
Refactor / Copy multiple files/classes: package statements are not updatedKT-18539
Default implement fun/property text shouldn't contain scary commentKT-28607
Extract/Introduce variable fails if caret is just after expressionKT-32601
Introduce variable in unformatted lambda causes PIEAEKT-34459
Change method signature with unresolved lambda type leads to errorKT-34971
Refactor / Copy for declarations from different sources throws IAE: “unexpected element” at CopyFilesOrDirectoriesHandler.getCommonParentDirectory()
IDE. Run Configurations
KT-34632
Kotlin/JS: Can not run single test method
IDE. Script
KT-34688
Many "scanning dependencies for script definitions progresses at the same time
IDE. Tests Support
KT-33787
IDE tests: Not able to run a single test using JUnit
JS. Tools
KT-35198
Kotlin/JS: with references to NPM/.kjsm library DCE produces invalid resulting JavaScript
JavaScript
KT-30517
KJS generates the wrong call for secondary constructor w/ default argument when class inherited by the object expressionKT-33149
JS: lambda is not a subtype of Function<*>
KT-33327
JS IR backend works incorrectly when function and property have the same nameKT-33334
JS IR backend can't access private var from internal inline function
Libraries
KT-17544
JS: document array destructuring behaviorKT-33069
StringBuilder common functionsKT-33447
runCatching docs suggests it catches exceptions but it catches throwablesKT-35175
Clarify documentation for XorWowRandomKT-35299
Float.rangeTo(Float): ClosedFloatingPointRange doesn't exist in the common stdlib.
Reflection
KT-14720
Move KClass.cast / KClass.isInstance into kotlin-stdlibKT-33646
Make KClass.simpleName available on JVM without kotlin-reflect.jarKT-34586
Make KClass.qualifiedName available on JVM without kotlin-reflect.jar
Tools. CLI
KT-29933
Support relative paths in -Xfriend-pathsKT-34119
Add JVM target bytecode version 13KT-34240
CLI kotlinc help -include-runtime has redundant space
Tools. Gradle. JS
New Features
KT-30659
Run NodeJS debugger when running debug gradle task from IDEAKT-32129
Gradle, JS, Karma: debugKT-32179
Gradle, JS, DSL: allow npm in root dependencies section of single platform projectsKT-32283
Configure webpack modeKT-32323
Gradle, JS, webpack: support optimized webpack bundleKT-32785
Gradle/JS + Webpack: Asset bundling in distributions folder
Fixes
KT-30917
Gradle, Tests: Inner classes mapped incorrectly in short test fail messageKT-34946
[Kotlin/JS] DCE require some/all transitive dependencies. Invalid compilation result otherwiseKT-35318
KJS: IllegalStateException on clean build with left-pad
package and generateKotlinExternals=trueKT-35428
[Gradle, JS] Gradle dependency with invalid package.jsonKT-35598
[Gradle, JS] Actualize NPM dependencies in 1.3.70
Tools. Gradle. Multiplatform
KT-35126
Support Gradle instant execution for Kotlin/JVM and Android tasks
Tools. J2K
KT-16774
UI Freeze: J2K, PlainTextPasteImportResolve: IDEA freezes for 10+ seconds when copy-pasting Java code from an external source to Kotlin fileKT-19574
Code with inferred default parameters and parameter vs property name clashesKT-21811
Convert string concatenation into a multiline stringKT-32551
New J2K: Non-canonical modifiers order inspection is not applied during conversion of a super inner classKT-34673
J2K: first comment in function (if, for, while) block is moved to declaration line of the blockKT-35152
J2K breaks formatting by moving subsequent single-line comments to the first column
Tools. Scripts
KT-34274
Add support for @CompilerOptions
annotation in kotlin-main-kts
KT-34893
Update apache ivy version in kotlin-main-ktsKT-35413
Implement “evaluate expression” command line parameter and functionality in the JVM cli compilerKT-35415
Implement script and expression evaluation in the kotlin
runnerKT-35416
load main-kts script definition by default in the jvm compiler, if the jar is available
Tools. kapt
KT-30164
Default field value not transmitted to Java source model for mutable propertiesKT-30368
Deprecated information not transmitted to Java source modelKT-32832
Kapt: Turn worker API on by defaultKT-33617
KAPT, Java 9+: “IllegalStateException: Should not be called!”KT-34167
Kapt: Annotation Processor incorrectly marked as isolating causes full rebuild silently.KT-34258
kapt.incremental.apt=true makes build failed after moving annotation processor files