1.3.50
Content
The release contains the JVM version of Kotlin compiler and also one native system dependent version for every major platform (Linux, macOS, and Windows).
CHANGELOG
1.3.50
Compiler
KT-12787
Debugger: Generate line number at end of function (to set a breakpoint on the last line of the block)KT-23675
"Parameter specified as non-null is null: method org.jetbrains.kotlin.codegen.FrameMapBase.getIndex, parameter descriptor" when classes are defined inside an anonymous extension function and access a field of the extension function'sthis
instanceKT-24596
Refactor / Inline const property does not insert its value into usage in annotationKT-25497
kotlinx.serialization - throws Backend Internal error exception during code generation of sealed classesKT-28927
"IllegalStateException: Arrays of class literals are not supported yet" in AnnotationDeserializer.resolveArrayElementTypeKT-31070
IndexOutOfBoundsException in Analyzer with @jvmoverloads constructor with 34+ parametersKT-31265
FIR: experimental compilerKT-31535
False positives from compiler warning IMPLICIT_NOTHING_AS_TYPE_PARAMETERKT-31969
NI: false positive USELESS_ELVIS with multiple elvis callsKT-32044
For loop over full UByte range terminates at UInt bound.KT-25432
No smartcast on qualifier expression of captured typeKT-30796
psi2ir generates IrErrorType for elvis with generic type having nullable upper-bound when expected type is not nullableKT-31242
"Can't find enclosing method" proguard compilation exception with inline and crossinlineKT-31347
"IndexOutOfBoundsException: Insufficient maximum stack size" with crossinline and suspendKT-31367
IllegalStateException: Concrete fake override public open fun (...) defined in TheIssue[PropertyGetterDescriptorImpl@1a03c376] should have exactly one concrete super-declaration: []KT-31734
Empty parameter list required on Annotations of function typesKT-32434
New type inference fails for Caffeine CacheKT-32452
Kotlin 1.3.40 - problem in IDE with new type inference and suspending method referenceKT-32407
NI: "use property access syntax" intention causes freezes in editorKT-33127
Script result value is not calculated properly for the last expressionKT-33157
Inline class with generic method is considered bad class by javac
Docs & Examples
KT-16602
Provide examples of sorting API usageKT-32353
Document order of array elements initialization
IDE
New Features
KT-28098
Insert space after automatically closed right brace of nested lambda to follow code style
Fixes
KT-16476
Extend selection (Select Word) doesn't select just KDoc if cursor is just before the KDocKT-21374
Imports optimized tooltip is displayed, even if no changes were madeKT-21422
IDE can't import class from root packageKT-27344
MPP: jvmWithJava: no IDE module dependency is created between Kotlin test and Java main on import; Gradle build is successfulKT-29667
Kotlin update settings has wrong looking text boxes for versionsKT-30133
Update copyright creates duplicates for build.gradle.kts filesKT-30782
'Show Method Separators' does not separate expression body Kotlin functionsKT-31022
Quick definition
does not show Kotlin code in Java filesKT-31499
"Extend selection" selects escaped identifier name together with backticksKT-31595
"Complete current statement" for method call closes brace at wrong placeKT-31637
NPE in IDE when organizing importsKT-31786
KNPE at copy attempt due to kdoc referenceKT-32276
Fix flaky test for ultra light classesKT-32364
Remove deprecated usages of OUT_OF_CODE_BLOCK_MODIFICATION_COUNT and write a replacement for Kotlin languageKT-32370
Lambdas should have implicitreturn
in Kotlin UastKT-12096
Spring: rename of Kotlin bean defined in@Bean
annotation failsKT-28193
Exception: Mirror element should never be calculated for light classes generated from a single fileKT-28822
Dependencies in Kotlin MPP project could be wrongly resolved if project was not build before importKT-29267
Enable ultra-light classes by defaultKT-31129
Call only Kotlin-specific reference contributors for getting Kotlin references from PSIKT-32082
Kotlin facet: 1.3.40 plugin does not properly read target platform settings of 1.3.50 pluginKT-32969
Data class extending abstract class with finaltoString
,equals
orhashCode
causes exceptionKT-33245
IllegalArgumentException exception occurs on Tools->Configure Koltin in Project action in Android Studio
IDE. Completion
KT-9792
Don't propose the same name for arguments of lambda on completion of function call with lambda templateKT-29572
Smart completing anonymous object uses incorrect code styleKT-25264
Freeze in Kotlin file on completionKT-32519
Keyword completion: support fixing layout and typo tolerance
IDE. Debugger
New Features
KT-30740
Display more information about variables when breakpoint is set inside lambda expression
Fixes
KT-8579
Debugger: Evaluate expression fails at typed arraysKT-10183
Debugger: receiver properties are not shown inline in extension functionKT-11663
Assignment is not possible in Evaluate expressionKT-11706
Attempts to evaluate java method calls on 'Array' instance in debugger fail with NoSuchMethodErrorKT-11888
Evaluate Expression for expression with synchronizedKT-11938
Empty condition is marked as errorKT-13188
Cannot evaluate expression with local extension functionKT-14421
Debugger: breakpoint set on trivial if/while is not hitKT-15259
Debug: closing brace of object definition is considered executable; ISE: "Don't call this method for local declarations: OBJECT_DECLARATION" at LazyDeclarationResolver.getMemberScopeDeclaredIn()KT-19084
Breakpoints on Debugger altering ResultKT-19556
Kotlin exception while debugging IJ plugin codeKT-19980
Debug: evaluation fails for setter of member extention propertyKT-20560
Evaluate expression doesn't work for super method callKT-23526
In *.kts scripts, debugger ignores breakpoints in top-level statements and membersKT-24914
AS: Uninitialized yet lazy properties called on first debug point reachKT-26742
Debugger can't evaluate expected top-level function from common codeKT-30120
False positive "Unused equals expression" in evaluate expression windowKT-30730
Missing tooltip for "Kotlin variables view" buttonKT-30919
Debugger's "Kotlin View" doesn't show variables inside lambdasKT-30976
Debugger: No access to receiver evaluating named parameters during call to extension functionKT-31418
java.lang.ClassCastException : java.lang.annotation.Annotation[] cannot be cast to byte[]KT-31510
isDumb should be used only under read action: KotlinEvaluatorKT-31702
Debugger can't stop on breakpoint onUnit
expression from coroutine contextKT-31709
Evaluate: "IllegalArgumentException: Parameter specified as non-null is null: method org.jetbrains.kotlin.codegen.FrameMapBase.getIndex, parameter descriptor" with nested lambda member accessKT-24829
Access to coroutineContext in 'Evaluate expression'
IDE. Gradle
KT-19693
Import package prefix from GradleKT-30667
Dependencies of a module on a multiplatform one with a JVM target andwithJava()
configured, are incorrectly resolved in IDEKT-32300
Add possibility to distinguish kotlin source root from java source rootKT-31014
Gradle, JS: Webpack watch modeKT-31843
Memory leak caused by KOTLIN_TARGET_DATA_NODE on project reimport
IDE. Gradle. Script
KT-31779
"Highlighting in scripts is not available"KT-30638
"Highlighting in scripts is not available until all Script Dependencies are loaded" in Diff viewerKT-30974
Script dependencies resolution failed error while trying to use Kotlin for GradleKT-31440
Add link to Gradle Kotlin DSL logs when script dependencies resolution process failsKT-32483
CNFE org.gradle.kotlin.dsl.KotlinBuildScript on creating new Gradle Kotlin project from wizardKT-21501
build.gradle.kts displays failures if not using java sdk for module
IDE. Inspections and Intentions
New Features
KT-8958
ReplaceWith intention message could be more helpful in case of generic substitutionKT-12515
Quickfix "by Delegates.notNull()" as replacement for "lateinit" for primitive typeKT-14344
Suggest to replace manual range with explicitindices
call or iteration over collectionKT-17916
Import popup does not indicate deprecated classesKT-23501
Add intention for converting ordinary properties to 'lazy' and vise versaKT-25006
Add inspection "'equals()' between objects of inconvertible primitive / enum / string types"KT-27353
Quickfix to add a constructor parameter from parent class to child classKT-30124
Add inspection to replace java.util.Arrays.equals with contentEqualsKT-30640
Add inspection for check/require/checkNotNull/requireNotNullKT-30775
Inspection for the case when one lateinit var overrides another lateinit varKT-31476
Improve "Create expect..." quickfixKT-31533
Make "Add operator modifier" an inspection instead of intentionKT-31795
Inspection: simplify property setter with custom visibilityKT-31924
Make "add import" intention more flexible based on caret positionKT-30970
No warning for emptyif
operator andalso
method
Fixes
KT-12567
"Introduce 'when' subject" intention does not work for "this" in extension functionKT-14369
"Replace elvis expression with 'if" intention produces boilerplate code for 'return' in RHSKT-16067
"Replace 'if' expression with elvis expression" suggests replacing an idiomatic code with non-idiomaticKT-19643
Tune or disable the FoldInitializerAndIfToElvis inspectionKT-24439
No method imports suggestedKT-25786
False positive "Not-null extension receiver of inline function can be made nullable" withoperator fun invoke
KT-25905
False positive for 'LeakingThis' on a method call in enum class bodyKT-27074
False positive "Foldable if-then" with Result typeKT-27550
"Redundant explicit this" false positive with subclass and extension lambdaKT-27563
Generate toString in common code shouldn't use java.util.ArraysKT-27822
Don't suggestmight be const
onactual
member declarationKT-28595
"Assignment should be lifted out of 'if'" false negative for different but compatible derived typesKT-29192
"Convert property to function" with explicit generic type loses getter bodyKT-29716
With both explicit and implicit package prefixes "Package name does not match containing directory" inspection suggests not usable quick fixKT-29731
Don't suggestAdd val/var to parameter
at expect class constructorKT-30191
"Lift out of if" intention isn't suggested for assignment of nullKT-30197
ReplaceWith for deprecated function adds class literal/callable reference argument above unless it is used in substitutionKT-30627
"Use property access syntax" produces red code if setter argument is a lambda with implicit SAM conversionKT-30804
Property declaration goes to annotation comment when removing only modifier using RemoveModifierFixKT-30975
''when' has only 'else' branch and should be simplified' inspection removes subject variable definition used in else branchKT-31033
"Create expect ..." quick fix incorrectly works for a secondary constructor in a multiplatform projectKT-31272
Expand "create expected ..." quick fix highlighting also to a primary constructorKT-31278
Inappropriate "Remove redundant .let call" inspectionKT-31341
Incorrect quickfix "Replace with Kotlin analog" for conversion to an extension, where the first argument is an expression with an operationKT-31359
"Invalid property key" inspection false positive for a bundle with several properties filesKT-31362
'Move variable declaration intowhen
' quickfix comments left brace with EOL commentKT-31443
Remove braces intention places caret in a wrong placeKT-31446
Incorrect quick fix “Create expected class" for inline class with parameter with actualKT-31518
Incorrect "Create expect function" for primary constructorKT-31673
Onlywhen
keyword should be highlighted in WhenWithOnlyElseInspectionKT-31716
Decrease severity of PackageDirectoryMismatchInspection to INFOKT-31717
Decrease severity of RemoveCurlyBracesFromTemplateInspectionKT-31816
"Package directive doesn't match file location" for root package is invisible in editorKT-31954
MoveVariableDeclarationIntoWhen should move the caret to the subject expressionKT-32001
Wrong quickfixes for TOO_MANY_ARGUMENTSKT-32010
Convert ReplaceSingleLineLetIntention to inspectionsKT-32046
False negative "Redundant qualifier name" with class literalKT-32112
False positive "Redundant qualifier name"KT-32318
"Remove argument name" intention does not remove square braces for annotation vararg argumentKT-32320
False negative "Redundant qualifier name" with local objectKT-32347
Duplicative "Remove redundant 'public' modifier" suggestion for getterKT-32365
"Convert to sealed class" intention should not be suggested when no "class" keywordKT-32419
Spurious 'while' has empty body warning when body has explanatory commentKT-32506
False negative "Remove redundant qualifier name" withjava.util.ArrayList<Int>()
KT-32454
"Replace Java static method with Kotlin analog": invalid quick fix on 'abs()' functionKT-26242
"Create test" intention does nothing in common moduleKT-27208
IDEA reports about the need to declare abstract or implement abstract method, but this method is @JvmStatic in an interface companionKT-27555
Create actual ...
quick fix does nothing if the corresponding source set directory isn't created yetKT-28121
IDE: Warn on java files under "src/main/kotlin" or "src/test/kotlin" source rootsKT-28295
UselanguageSettings
for a quick fix to enable experimental features in multiplatform projectsKT-28529
Don't suggestcommonMain
source set as a target ofcreate expected ...
quick fix for a member of*Test
source setKT-28746
“Create actual class” quick fix creates invalid file when is called from files located in package directory but don't have package nameKT-30622
Add names to call arguments starting from given argumentKT-31404
Redundant 'requireNotNull' or 'checkNotNull' inspection: don't remove first argumentKT-32705
"Create expect" quick fix addsactual
modifier to aconst
/lateinit
declaration without a warningKT-32967
Warning about incorrectly placed Java source file isn't automatically dismissed on move of the file to the proper source root
IDE. JS
KT-31895
New Project wizard: Kotlin Gradle + Kotlin/JS for Node.js: incorrect DSL is inserted
IDE. KDoc
KT-30985
Missing line break in quick doc for enum constant
IDE. Multiplatform
KT-29757
IDE fails to import transitive dependency of a JVM module to a multiplatform one
IDE. Navigation
KT-10215
Kotlin classes are listed after Java classes in the navigation bar
IDE. Refactorings
KT-29720
Refactor / Move does not update package statement with implicit prefixKT-30762
Inline method produces invalid code for suspend functions with receiverKT-30748
100+ Seconds UI Freeze on performing a Move Refactoring on a file with a lot of usages (KotlinOptimizeImports in thread dump)
IDE. Scratch
KT-23604
Scratch: end of line is wrongly indented with the end of scratch line outputKT-27963
Make REPL mode in Scratch files incrementalKT-29534
Line output jumps to the next line together with cursorKT-32791
"Access is allowed from event dispatch thread only" while working with a scratch file
IDE. Script
KT-25187
Kotlin script in src: warning: classpath entry points to a non-existent location on JDK 9+KT-31152
Errors in IDE when different Java Sdk are set as Project SDK and as Gradle JVMKT-31521
CNFE „org.jetbrains.kotlin.idea.caches.project.ScriptBinariesScopeCache“ on creating new Gradle based projectKT-31826
Gradle clean task causes IDEA to lose kotlin scripting configurationKT-31837
TargetPlatform for scripts should depends on scriptDefinition.additionalArgumentsKT-30690
Highlighting for scripts in diff view doesn't work for left partKT-32061
Check classpath jars before applying script compilation result from file attributesKT-32554
Freezes in ScriptDependenciesUpdater
IDE. Tests Support
KT-30814
MPP, 191 platform: with Gradle test runner run configuration for platform test is created without tasks
IDE. Wizards
KT-32105
MPP project wizard: add option for Kotlin Gradle DSL
JS. Tools
KT-31527
Keep generating emptyjsTest
taskKT-31565
Gradle/JS:npmResolve
is never UP-TO-DATEKT-32326
Gradle, test runner: support postponing test running error reporting at the end of the buildKT-32393
Gradle, JS: Resolve projects lazilyKT-31560
Gradle: provide descriptions for JS tasksKT-31563
Gradle/JS: npmResolve fails with "Invalid version" when user project's version does not match npm rulesKT-31566
Gradle/JS: with explicit call tonodejs { testTask { useNodeJs() } }
configuration fails : "Could not find which method to invoke"KT-31694
Gradle, NPM, windows: creating symlink requires administrator privilege
Libraries
KT-29372
measureTime that returns both the result of block and elapsed timeKT-32083
Incorrect ReplaceWith annotation on kotlin.js.powKT-12749
Provide Int.bitCount, Long.bitCount etc.KT-32359
Common Array.fillKT-33225
JS: Incorrect conversion of infinite Double to Long
Reflection
KT-22923
Reflection getMemberProperties fails: kotlin.reflect.jvm.internal.KotlinReflectionInternalErrorKT-31318
"KotlinReflectionInternalError: Method is not supported" on accessing array class annotation parameter
Tools. Daemon
KT-31550
NSME org.jetbrains.kotlin.com.intellij.openapi.vfs.impl.jar.CoreJarFileSystem.clearHandlersCache()V on compileKotlin task with plugin from masterKT-32490
Compiler daemon tests fail on windows due to directory name being too longKT-32950
Daemon should inherit "-XX:MaxMetaspaceSize" of client VMKT-32992
Enable assertions in Kotlin Compile DaemonKT-33027
Compilation with daemon fails, because IncrementalModuleInfo#serialVersionUID does not match
Tools. CLI
KT-33177
Introduce compiler flags -Xinline-classes and -Xpolymorphic-signature as a higher priority than -XXLanguage
Tools. Compiler Plugins
KT-28824
Add jvm-abi-gen-embeddable for use with embeddable compilerKT-31279
JPS build with compiler plugin and "Keep compiler alive = No" fails with CCE: "Cannot cast NoArgComponentRegistrar to ComponentRegistrar" at ServiceLoaderLite.loadImplementations()KT-32346
kotlinx.serialization: Performance problems with completion/intellisense
Tools. Gradle
New Features
KT-26655
Precise metadata publishing and consumption for new MPPKT-31018
Gradle, JS: yarnKT-31703
Gradle, JS: automatically download d.ts and generate kotlin/js external declarations using dukatKT-31890
Gradle, JS, webpack: provide property with full bundle file pathKT-32015
Gradle, JS: resolve configuration only while executing tasks of specific projectsKT-32136
Gradle, test runner: handle case when test runtime exits abnormallyKT-26256
In new MPP, support Java compilation in JVM targetsKT-30573
Gradle, JS: enable source maps by default, change paths relative to node_modules directoryKT-30747
Gradle, JS tests: provide option to disable test configuration per targetKT-31010
Gradle, JS tests: MochaKT-31011
Gradle, JS tests: KarmaKT-31013
Gradle, JS: WebpackKT-31016
Gradle: yarn downloadingKT-31017
Gradle, yarn: support workspacesKT-31697
Gradle, NPM: report about clashes in packages_imported
Performance Improvements
KT-29538
AndroidSubPlugin#getCommonResDirectories is very slow
Fixes
KT-29343
Kotlin MPP source set dependencies are not properly propagated to tests in Android projectsKT-30691
Gradle, JS tests: Parent operation with id 947 not available when all tests passedKT-31917
Gradle, JS: transitive dependency between compilations in same project doesn't workKT-31985
Gradle, JS: webpack not working on windowsKT-32072
Gradle, JS: browser() in DSL triggers project.evaluate()KT-32204
In an MPP, a dependency that is added to a non-root source set is incorrectly analyzed for source sets visibilityKT-32225
In an MPP, if a dependency is added to a source set that does not take part in published compilations, it is not correctly analyzed in source set visibility inferenceKT-32564
Provide a flag to enable/disable hierarchical multiplatform mechanism in GradleKT-31023
Update Gradle module metadata warning in MPP publishingKT-31696
Gradle, NPM: select one version between tools and all of compile configurationsKT-31891
Gradle: JS or Native tests execution:build --scan
fails with ISE "Expected attachment of type ... but did not find it"KT-32210
Kapt randomly fails with java.io.UTFDataFormatExceptionKT-32706
Gradle target "jsBrowserWebpack" should use output of JS compile task as inputKT-32697
[Tests] org.jetbrains.kotlin.gradle.SubpluginsITKT-33246
Kotlin JS & Native tests + Gradle 5.6: No value has been specified for property 'binaryResultsDirectory'
Tools. Incremental Compile
KT-31310
Incremental build of Kotlin/JS project fails with KNPE at IncrementalJsCache.nonDirtyPackageParts()
Tools. J2K
New Features
KT-30776
New J2KKT-31836
Suggest user to configure Kotlin in the project when running new J2K file conversionKT-32512
ReplaceJavaStaticMethodWithKotlinAnalogInspection: add more cases for java.util.Arrays
Fixes
KT-15791
J2K converts class literals including redundant generic <*>KT-31234
New J2K: Exception occurs on converting Java class to KotlinKT-31250
J2K: caret position of original file is preserved, adding spaces to resulting fileKT-31251
J2K: Java class with members is converted to Kotlin class withfinal
constructorKT-31252
J2K: resulted file is not formattedKT-31254
J2K: resulted source uses full qualified references instead of importsKT-31255
J2K: redundant modifiers in resulted sourceKT-31726
New J2K converts annotation with array parameter to single value parameterKT-31809
"Attempt to modify PSI for non-committed Document!" exception and broken kotlin file after new J2K conversionKT-31821
J2K: IDEA Ultimate: local variable: CCE: "PsiLocalVariableImpl cannot be cast to class JvmAnnotatedElement" at JavaToJKTreeBuilder$DeclarationMapper.toJK()KT-32436
NewJ2K generic field is not initialized after convertionKT-19327
Java to Kotlin converter fails to convert code using Java 8 Stream APIKT-21467
Convert To Kotlin fails when using chained stream.flatmap methodsKT-24677
j2k creates nullable type for child function but keeps not null type for parent functionKT-32572
New J2K: Map with complex type as parameter is wrongly convertedKT-32602
J2K: no conversion ofString.length()
method call to property access of existing String propertyKT-32604
kotlin.NotImplementedError exception occurs on converting Java call of toString method of data class to KotlinKT-32609
New J2K: Comparable class is wrongly converted to Kotlin if parameter of compareTo marked with @NotNull annotationKT-32693
New J2K is throwing „Read access is allowed from event dispatch thread or inside read-action only“ on converting Java code inside Evaluate Expression windowKT-32702
New J2K: lambda with method reference is converted to lamdba with excessive parameter declarationKT-32835
New J2K: NumberFormatException occurs on converting binary literalsKT-32837
J2K: NumberFormatException occurs on converting literals with underscore charactersKT-22412
J2K: Intention to replace if(...) throw IAE with requireKT-33371
Add an ability to switch between old and new J2K via settings windowKT-32863
New J2K: IllegalArgumentException occurs on Kotlin configuration in java project in Android Studio
Tools. JPS
KT-27181
Compiler arguments are listed twice on JPS build of Gradle-based projectKT-13563
Kotlin jps-plugin should allow to instrument bytecode from Intellij IDEA.
Tools. REPL
KT-15125
Support JSR 223 bindings directly via script variablesKT-32085
Kotlinc REPL: "java.lang.NoClassDefFoundError: org/jline/reader/LineReaderBuilder"
Tools. Scripts
KT-28137
Implement result/return value for the regular (non-REPL) scripts
Tools. kapt
KT-30578
build/generated/source/kaptKotlin
is added as source directory tomain
instead ofjvmMain
when jvm { withJava() } is configured in a multiplatform projectKT-30739
Kapt generated sources are not visible from the IDE when "Create separate module per source set" is disabledKT-31127
Kotlin-generating processor which uses Filer API breaks JavaCompile taskKT-31378
v1.3.31: NoSuchElementException in kapt when kapt.incremental.apt=trueKT-32535
Kapt aptMode=compile don't include files generated atkapt.kotlin.generated
as sources to compileKT-31471
KAPT prints "IncrementalProcessor" instead of processor name in verbose mode
Kotlin Native
Related Kotlin Native changelog can be found separately.
Previous releases
This release also includes the fixes and improvements from the previous releases.