Repository navigation
Kotlin 1.2.40 RC2
Pre-release
Pre-release
Compiler
New Features
KT-22703Allow expect/actual annotation constructors to have default valuesKT-19159Supportcrossinlinelambda parameters ofsuspendfunction typeKT-21913Support default arguments for expected declarationsKT-19120Provide extra compiler arguments inScriptTemplateDefinitionKT-19415Introduce@JvmDefaultannotationKT-21515Restrict visibility of classifiers insidecompanion objects
Performance Improvements
KT-10057Uselcmpinstruction instead ofkotlin/jvm/internal/Intrinsics.compareKT-14258Suboptimal codegen for private fieldaccess to private field in companion objectKT-18731==between enums should use reference equality, notIntrinsics.areEqual().KT-22714Unnecessary checkcast to array of object from an array of specific typeKT-5177Optimize code generation forforloop withwithIndex()KT-19477Allow to implement several common modules with a single platform moduleKT-21347Add compiler warning about using kotlin-stdlib-jre7 or kotlin-stdlib-jre8 artifacts
Fixes
KT-16424Broken bytecode for nullable generic methodsKT-17171ClassCaseExceptionin case of SAM conversion withoutvarianceKT-19399Incorrect bytecode generated for inline functions in some complex casesKT-21696Incorrect warning for use-site target on extension functionKT-22031Non-abstractexpect classes should not haveabstractmembersKT-22260Never flaginline suspend funwithNOTHING_TO_INLINEKT-22352Expect/actual checker can't handle properties and functions with the same nameKT-22652Interface with default overrides is not perceived as a SAMKT-22904Incorrect bytecode generated for withIndex iteration onArray<Int>KT-22906Invalid class name generated for lambda created from method reference in anonymous objectKT-23044Overriden public property with internal setter cannot be found in runtimeKT-23104Incorrect code generated for LHS of an intrinsifiedinoperator in case of generic type substituted withCharacterKT-23309Minor spelling errors in JVM internal error messagesKT-22001JS: compiler crashes on += with "complex" receiverKT-23239JS: Default arguments for non-final member function support is missing for MPPKT-17091Converting to SAM Java type appends non-deterministic hash to class nameKT-21521Compilation exception when trying to compile asuspendfunction withtailreckeywordKT-21605Cross-inlined coroutine with captured outer receiver creates unverifiable codeKT-21864Expect-actual matcher doesn't consider generic upper boundsKT-21906ACTUAL_MISSINGis reported for actual constructor of non-actual classKT-21939ImproveACTUAL_MISSINGdiagnostics messageKT-22513Flaky "JarURLConnection.getUseCaches" NPE during compilation when using compiler plugins
Libraries
KT-11208readLine()shouldn't use buffered reader
IDE
New Features
KT-10368Run Action for Kotlin Scratch FilesKT-16892Shortcut to navigate between header and implKT-23005Supportprefix/suffixattributes for language injection in Kotlin with annotations and comments
Performance Improvements
KT-19484KotlinBinaryClassCache retains a lot of memoryKT-23183ConfigureKotlinNotification.getNotificationString()scans modules with Kotlin files twiceKT-23380Improve IDE performance when working with Spring projects
Fixes
KT-15482KotlinNullPointerExceptionin IDE from expected class with nested classKT-15739Internal visibility across common and platform-dependent modulesKT-19025Not importedbuild.gradle.ktsis all redKT-19165IntelliJ should suggest to reload Gradle projects whenbuild.gradle.ktschangesKT-20282'Move statement up' works incorrectly for statement afterfinallyblock iftryblock contains closureKT-20521Kotlin Gradle script: validbuild.gradle.ktsis red and becomes normal only after reopening the projectKT-20592KotlinNullPointerException: nested class inside expect / actual interfaceKT-21013"Move statement up/down" fails for multiline declarationsKT-21420.gradle.ktseditor should do no semantic highlighting until the first successful dependency resolver responseKT-21683Language injection: JPAQL. Injection should be present for "query" parameter of@NamedNativeQueriesKT-21745Warning and quickfix about kotlin-stdlib-jre7/8 -> kotlin-stdlib-jdk7/8 in MavenKT-21746Warning and quickfix about kotlin-stdlib-jre7/8 -> kotlin-stdlib-jdk7/8 in GradleKT-21753Language injection: SpEL. Not injected for key in@CachingKT-21771All annotations inAnnotations.ktfrom kotlin-test-js module wrongly have ACTUAL_MISSINGKT-21831Opening class fromkotlin-stdlib-jdk8.jarfails with EE: "Stub list in ... length differs from PSI"KT-22229Kotlin local delegated property Import auto-removed with "Java: Optimize imports on the fly"KT-22724ISE: "psiFile must not be null" atKotlinNodeJsRunConfigurationProducer.setupConfigurationFromContext()KT-22817Hitting 'Propagate Parameters' in Change Signature throwsUnsupportedOperationExceptionKT-22851Apply button is always active on Kotlin compiler settings tabKT-22858Multiplatform: String constructor parameter is reported in Java file of jvm module on creation of a new instance of a class from common moduleKT-22865Support multiple expectedBy dependencies when importing project from Gradle or MavenKT-22873Common module-based light classes do not see JDKKT-22874Exception on surround with "if else" when resulting if should be wrapped with()KT-22925Unable to view Type Hierarchy from constructor call in expressionKT-22926Confusing behavior of Type Hierarchy depending on the caret position at superclass constructorKT-23097Enhance multiplatform project wizardKT-23271Warn about using kotlin-stdlib-jre* libs independencyManagementsection in Maven witheapanddevKotlin versionsKT-20672IDE can't resolve references to elements from files with@JvmPackageNameKT-23546Variable name auto-completion popup gets in the way
IDE. Gradle. Script
KT-23228Do not highlight.gradle.ktsfiles in non-Gradle projects
IDE. Inspections and Intentions
New Features
KT-16382Intention to convertexpr.unsafeCast<Type>()toexpr as Typeand vice versaKT-20439Intentions to add/remove labeled return to last expression in a lambdaKT-22011Inspection to report the usage of Java Collections methods on immutable Kotlin CollectionsKT-22933Intention/inspection to convert Pair constructor totofunctionKT-19871Intentions for specifying use-site targets for an annotationKT-22971Inspection to highlight and remove unnecessary explicit companion object references
Fixes
KT-12226"Convert concatenation to template" does not process$sign as a CharKT-15858"Replace with aforeachfunction call" intention breaks codeKT-16332Add braces to 'if' statement intention does not put end-of-line comment properly into bracesKT-17058"Create implementations from headers": each implementation gets own fileKT-17306Don't report package name mismatch if there's no Java code in the moduleKT-19730Quickfix for delegated properties boilerplate generation doesn't work on localsKT-21005"Missing KDoc inspection" is brokenKT-21082"Create actual declaration" of top-level subclass of expectedsealed classin the same file as actual declaration of sealed class presentKT-22110"Can be joined with assignment" inspection underlining extends into commentKT-22329"Create class" quickfix is not suggested inwhenbranchKT-22428Create member function from usage shouldn't present type parameters as optionsKT-22492"Specify explicit lambda signature" intention is available only on lambda bracesKT-22719Incorrect warning 'Redundant semicolon' when having method call before lambda expressionKT-22861"Add annotation target" quickfix is not available on annotation with use site targetKT-22862"Add annotation target" quickfix does not process existent annotations with use site targetKT-22917Update order of containers forcreate classquickfixKT-22949NPE on conversion ofrun/applywith explicit lambda signature tolet/alsoKT-22950Convert stdlib extension function to scoping function works incorrectly in case of explicit lambda signatureKT-22954"Sort modifiers" quickfix works incorrectly when method is annotatedKT-22970Add explicit this intention/inspection missing for lambda invocationKT-23109"Remove redundant 'if' statement" inspection breaks code with labeled returnKT-23215"Add function to supertype" quickfix works incorrectlyKT-14270Intentions "Add/Remove braces" should be applied to the statement where caret is if there several nested statements one into anotherKT-21743Method reference not correctly moved into parenthesesKT-23045AE “Failed to create expression from text” on concatenating string with broken quote mark char literalKT-23046CCE ”KtBinaryExpression cannot be cast to KtStringTemplateExpression” on concatenating broken quote mark char literal with stringKT-23227"Add annotation target" quickfix is not suggested forfield:use-site target
IDE. Refactorings
Fixes
KT-13255Refactor / Rename: renaming local variable or class to existing name gives no warningKT-13284Refactor / Rename: superfluous imports and FQNs in Java using@JvmOverloadsfunctionsKT-13907Rename refactoring warns about name conflict if there is function with different signature but the same nameKT-13986Full qualified names of classes in comments should be changed after class Move, if comment contains backquotesKT-14671typealias: refactor/rename should propose to rename occurrences in commentsKT-15039Extra usage is found for a parameter in data class in destructuring constructionKT-15228Extract function from inline function should create public functionKT-15302Reference to typealias in SAM conversion is not foundKT-16510Can't rename quoted identifierisKT-17827Refactor / Move corrupts bound references when containing class of member element is changedKT-19561Name conflict warning when renaming method to a name matching an extension method with the same name existsKT-20178Refactor → Rename can't make companion object name emptyKT-22282Moving a Kotlin file to another package does not change imports in itselfKT-22482Rename refactoring insert qualifier for non related property callKT-22661Refactor/Move: top level field reference is not imported automatically after move to the source rootKT-22678Refactor / Copy: "Class uses constructor which will be inaccessible after move" when derived class has a protected constructorKT-22692Refactor/Move: unnecessary curly braces added on moving to a separate file a top level function with a top level field usageKT-22745Refactor/Move inserts FQ function name at the call site if there is a field same named as the functionKT-22747Moving top-level function to a different (existing) file doesn't update references from JavaKT-22751Refactor/Rename: type alias name clash is not reportedKT-22769Refactor/Move: there is no warning on moving sealed class or its inheritors to another fileKT-22771Refactor/Move: there is no warning on moving nested class to another class with stricter visibilityKT-22812Refactor/Rename extension functions incorrectly conflicts with other extension functionsKT-23065Refactor/Move: Specify the warning message on moving sealed class inheritors without moving the sealed class itself
IDE. Script
KT-22647Run script Action in IDE should use Kotlin compiler from the IDE pluginKT-18930IDEA is unstable With Gradle Kotlin DSLKT-21042Gradle Script Kotlin project is full-redKT-11618Running .kts file from IntelliJ IDEA doesn't allow to import classes in other files which are also part of the project
IDE. Debugger
KT-22205Breakpoints won't work for Kotlin testing with JUnit
JavaScript
KT-22019Fix wrong list sorting order
Tools. CLI
KT-22777Unstable language version setting has no effect when attached runtime has lower version
Tools. Gradle
KT-22824expectedBydependency should be expressed ascompiledependency in POMKT-15371Multiplatform: setting free compiler args can break buildKT-22864Allow multiple expectedBy configuration dependencies in GradleKT-22895'kotlin-runtime' library is missing in the compiler classpath sometimesKT-23085Use proper names for the Gradle task inputs/outputs added at runtime
Tools. Incremental Compile
KT-20516"Unresolved reference" when project declares same class as its dependencyKT-22542"Source file or directory not found" for incremental compilation with KobaltKT-23165Incremental compilation is sometimes broken after moving one class
Tools. JPS
KT-16091Incremental compilation ignores changes in Java static fieldKT-22995EA-91869 - NA:LookupStorage.<init>
Tools. kapt
KT-21735Kapt cache was not cleared sometimes
Tools. REPL
KT-21611REPL: Empty lines should be ignored