Contents
The release contents the JVM version of the Kotlin compiler, and also the Kotlin/Native compiler for the supported platforms: Linux, macOS and Windows.
Changelog
Backend. Native
KT-40209
java.lang.UnsupportedOperationException: org.jetbrains.kotlin.ir.declarations.impl.IrValueParameterImpl@76484173KT-40367
Kotlin/Native-Swift interop (iOS): Array member initialization failing in release builds
Compiler
Fixes
KT-31025
Type mismatch when callable reference is resolved with a functional expected type and SAM conversionKT-37388
Consider relaxing rules about inferring Nothing inside special constructions (if, try, when)KT-37717
NI: "IllegalStateException: Error type encountered" with @BuilderInferenceKT-38427
New inference in branched conditions (if, when) results in odd behavior with inconsistent compiler warnings and runtime errorsKT-38899
NI: False positive IMPLICIT_NOTHING_TYPE_ARGUMENT_IN_RETURN_POSITION leads to NPEKT-39468
NI: overload resolution ambiguity between functions passingT
andFoo<T>
with a contravariant receiverKT-39618
NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER: unable to infer generic type on @BuilderInference annotated lambda parameter with receiver typeKT-39633
NI: Incorrect type parameter instantiation based on contravariant type argumentKT-39691
NI: Missing SAM conversion for nullable lambdaKT-39860
Make Kotlin binaries publicly available (set KotlinCompilerVersion.IS_PRE_RELEASE = false)KT-39900
NI: Incorrect type inference in a lambda returning UnitKT-39925
New JVM default compilation mode doesn't check that JVM target is 1.8KT-39943
Write information about all-compatibility mode in metadataKT-39953
NI: ClassCastException "cannot be cast to java.lang.Void" with if-else in return statement in ANdroid projectKT-40045
NI: lambda’s receiver type isn't inferred properlyKT-40057
NI: provideDelegate org.jetbrains.kotlin.codegen.CompilationException: Back-end (JVM) Internal error: wrong bytecode generated for static initializerKT-40060
NI: postponed variable from the builder inference flows to back-end and leads to throw an exceptionKT-40112
Kotlin Gradle DSL: COMPATIBILITY_WARNING onkotlin.sourceSets
blockKT-40113
Kotlin Gradle DSL: "Expression 'main' cannot be invoked as a function" fordistributions.main
DSL blockKT-40128
Introduce compiler key to disable compatibility resolution mechanism for new inference featuresKT-40151
NI: postponed variable isn't substituted for top-level CR inside builder inferenceKT-40214
AbstractMethodError in gradle subplugin which is used in Android appKT-40234
Deprecation level "hidden" has no effect on callable reference argumentKT-40247
NI: false positive "function should be called from coroutine or another suspend function" for suspend invoke operator in try-catchKT-40254
Rewrite at slice with two callable reference argumentsKT-40269
NI: "disabled Unit conversions" error has appeared on green codeKT-40337
NI: false positive "function should be called from coroutine or another suspend function" for suspend invoke operator inwhen
blockKT-40406
Prohibit reflection on adapted callable references
IDE
KT-39968
Paths in KotlinJavaRuntime library aren't updated after you run IDE from a different directoryKT-39989
NullPointerException when opening Kotlin facets in Project Structure dialog in IDEA 192KT-40311
Create change_notes for 1.4 in IDE plugin description
IDE. Debugger
KT-39808
(CoroutineDebugger) Doesn't start with kotlinx-coroutines-core >= 1.3.6KT-40073
(CoroutineDebugger) Change minimum supported kotlinx.coroutines version to 1.3.8*KT-40172
Restored frame variables isn't shown for suspended coroutines
IDE. Gradle Integration
KT-38744
No dependency between Androidtest
and commonTest source sets with kotlin.mpp.enableGranularSourceSetsMetadata=trueKT-39037
'None of the consumable configurations have attributes' in MPP IDE import with transitive project dependency on self
IDE. Gradle. Script
KT-31137
IntelliJ would get very slow when editing gradle buildSrc(using the kotlin dsl)KT-36078
Gradle Kotlin script context is not reloaded when gradle/wrapper/gradle-wrapper.properties file is changedKT-39317
ISE “Calling invokeAndWait from read-action leads to possible deadlock.” on importing simple Gradle-based project in nightly IJ
IDE. Inspections and Intentions
KT-28662
Inspection to flag usage of the wrong Transient annotation on Kotlin Serializable classKT-34209
Switch default behaviour in 1.4 for insertion (to build script) via quick fix of the compiler option enabling inline classesKT-36131
Suggest to add a missing module dependency on an unresolved reference in Kotlin codeKT-37462
Add "Add dependency to module" quickfix in multimodule Maven projectKT-39869
Add whole project migration usages of kotlin.browser.* & kotlin.dom.* to kotlinx.browser.* & kotlinx.dom.* respectively
IDE. Wizards
KT-40004
New Project wizard 1.4+: nohttps://dl.bintray.com/kotlin/kotlinx
repository is added for kotlinx-htmlKT-40037
New Project wizard: update Ktor versionKT-40092
Wizard: the templates panel on mac OS is too wideKT-40232
New Wizard: Android Sdk path doesn't have backslash escaping on WindowsKT-40371
New Project Wizard: Frontend Application / Library results in broken run configurationKT-40377
New Project Wizard: Frontend Application defines NPM dependencies that are unnecessary with Kotlin 1.4-RC+KT-40378
New Project Wizard: Frontend Application, Disabling JavaScript test framework has no effectKT-40407
Wizard: do not add stdlib by default for Gradle projects in wizard
JS. Tools
KT-39984
Update dukat version in toolchain near to release of 1.4-RC
JavaScript
KT-32186
Make sure K/JS Reflection API documentation is correct and fix it.KT-37563
K/JS: stacktrace is not captured for exceptions without primary constructor inherited from Exception/ErrorKT-37752
Generated typescript incorrect for constructors of derived classesKT-37883
KJS: Generated TypeScript uses 'declare' rather than 'export'KT-38771
JS: support non-reified type parameters in typeOfKT-39873
Update Kotlin JavaScript wrappers due to NON_EXPORTABLE_TYPE diagnostic introductionKT-40126
[JS / IR] NPE while compiling interfaces with invoke which is passed as a delegateKT-40216
KJS / IR: AssertionError caused by an anonymous object in the dependency project
Libraries
KT-33069
StringBuilder common functionsKT-35972
Add contract to builder functionsKT-37101
Mark following api with DeprecatedSinceKotlin("1.4")KT-38360
Make sure that JB libraries correctly define their npm deps and republish them (after KT-30619)KT-38817
'capitalize' should convert digraphs to title caseKT-40168
Remove StringBuilder.capacity from common and JS parts
Middle-end. IR
KT-40520
Assert during fake-override generation
Tools. Commonizer
KT-40199
Commonizer loses nullability of abbreviated types
Tools. Compiler Plugins
KT-40036
Add diagnostic that shows is serialization plugin compatible with serialization-runtime
Tools. Gradle
KT-39755
[KJS / Gradle / Legacy mode] Directory with whitespace is not processedKT-39809
Kotlin Gradle plugin: ServiceConfigurationError: org.jetbrains.kotlin.gradle.plugin.KotlinGradleSubplugin: Provider org.jetbrains.kotlin.gradle.internal.AndroidSubplugin not a subtypeKT-39977
Collect statistics of used -Xjvm-default optionsKT-40300
Fail the build if in MPP plugin no targets configured
Tools. Gradle. JS
KT-38170
Investigate how to improve migration experience from pre 1.4.0 DSL to the new oneKT-39654
Default CSS settings in webpack has priority over user's settingsKT-39842
Kotlin/JS Gradle DSL: peerNpm dependency failsKT-40048
[Gradle, JS] Deprecate kotlin-frontend pluginKT-40067
[Gradle, JS] Public package.json for mixed JS/TS projectKT-40210
Fail the build when Kotlin/JS target is not (properly) configuredKT-40320
Gradle JS: make migration to the new Gradle DSL smoother
Tools. Gradle. Multiplatform
KT-32239
Custom configurations inside Kotlin JVM Gradle projects can't properly resolve multiplatform dependenciesKT-39897
[Commonizer] Fast-pass for library fragments absent for some targets
Tools. J2K
KT-39739
J2K: Access is allowed from event dispatch thread with IW lock only
Tools. kapt
KT-34604
KAPT: Flaky NPE throughorg.jetbrains.kotlin.kapt3.base.ProcessorLoader.doLoadProcessors
KT-36302
TypeTreeVisitor.visitMemberSelect IllegalStateException: node.sym must not be null on JDK 11KT-39876
KAPT: Serialization of classpath structure is incorrect if there are dependencies between types in jar/dir