Releases: JetBrains/kotlin
Releases · JetBrains/kotlin
1.3 RC
Compiler
New Features
KT-17679Support suspend fun main in JVMKT-24854Support suspend function types for arities bigger than 22KT-26574Support main entry-point without arguments in frontend, IDE and JVM
Performance Improvements
KT-26490Change boxing technique: instead of callingvalueOf, allocate new wrapper type
Fixes
KT-22069Array class literals are always loaded asArray<*>from deserialized annotationsKT-22892Call ofinvokefunction with lambda parameter on a field namedsuspendshould be reportedKT-24708Incorrect WhenMappings code generated in case of mixed enum classes in when conditionsKT-24853Forbid KSuspendFunctionN and SuspendFunctionN to be used as supertypesKT-24866Review support of all operators for suspend function and forbid all unsupportedKT-25461Mangle names of functions that have top-level inline class types in their signatures to allow non-trivial non-public constructorsKT-25785Unsigned delegated property returns different value depending on the site it is usedKT-25855Load Java declarations which reference kotlin.jvm.functions.FunctionN as Deprecated with level ERRORKT-26071Postpone conversions from signed constant literals to unsigned onesKT-26141actual typealias for expect sealed class results in error "This type is sealed, so it can be inherited by only its own nested classes or objects"KT-26200Forbid suspend functions annotated with @kotlin.test.TestKT-26219Result of unsigned predecrement/preincrement is not boxed as expectedKT-26223Inline lambda arguments of inline class types are passed incorrectlyKT-26291Boxed/primitive types clash when overriding Kotlin from Java with common generic supertype with inline class type argumentKT-26403Add-implsuffix tobox/unboxmethods and make them syntheticKT-26404Mangling: setters for properties of inline class typesKT-26409implies in CallsInPlace effect isn't supportedKT-26437Generate constructors containing inline classes as parameter types as private with synthetic accessorsKT-26449Prohibit equals-like and hashCode-like declarations inside inline classesKT-26451Generate static methods with equals/hashCode implementationsKT-26452Get rid of $Erased nested class in ABI of inline classesKT-26453Generate all static methods in inline classes with “-impl” suffixKT-26454Prohibit @JvmName on functions that are assumed to be mangledKT-26468Inline class ABI: Constructor invocation is not represented in bytecodeKT-26480Report error from compiler when suspension point is located between corresponding MONITORENTER/MONITOREXITKT-26538Prepare kotlin.Result to publication in 1.3KT-26558Inline Classes: IllegalStateException when invoking secondary constructor for a primitive underlying typeKT-26570Inline classes ABIKT-26573Reserve box, unbox, equals and hashCode methods inside inline class for future releasesKT-26575Reserve bodies of secondary constructors for inline classesKT-26576Generate stubs for box/unbox/equals/hashCode inside inline classesKT-26580Add version to kotlin.coroutines.jvm.internal.DebugMetadataKT-26659Prohibit using kotlin.Result as a return type and with special operatorsKT-26687Stdlib contracts have no effect in common codeKT-26707companion val of primitive type is not treated as compile time constantKT-26720Write language version requirement on inline classes and on declarations that use inline classesKT-26859Inline class misses unboxing when using indexer into an ArrayListKT-26936Report warning instead of error on usages of Experimental/UseExperimentalKT-26958Introduce builder-inference with an explicit opt-in for it
IDE
New Features
KT-26525"Move Element Right/Left": Support type parameters inwhereclause (multiple type constraints)
Fixes
KT-22491MPP new project/new module templates are not convenientKT-26428Kotlin Migration in AS32 / AS33 fails to complete after "Indexing paused due to batch update" eventKT-26484Do not show-Xmulti-platformoption in facets for common modules of multiplatform projects with the new modelKT-26584@language prefix and suffix are ignored for function argumentsKT-26679Coroutine migrator should rename buildSequence/buildIterator to their new namesKT-26732Kotlin language version from IDEA settings is not taken into account when working with Java codeKT-26770Android module in a multiplatform project isn't recognised as a multiplatform moduleKT-26794Bad version detection during migration in Android Studio 3.2KT-26823Fix deadlock in databinding with AndroidX which led to Android Studio hangingKT-26827ISE “Error type encountered: [ERROR : UInt] (UnresolvedType)” for data inline class wrapped unsigned typeKT-26829ISE “Error type encountered: [ERROR : UInt] (UnresolvedType)” for using as a field inline class wrapped unsigned typeKT-26843LazyLightClassMemberMatchingError$NoMatch: Couldn't match ClsMethodImpl:getX MemberIndex(index=1) (with 0 parameters)on inline class overriding inherited interface method defined in different filesKT-26895Exception while building light class for @serializable annotated class
IDE. Android
KT-26169Android extensions are not recognised by IDE in multiplatform projectsKT-26813Multiplatform projects without Android target are not imported properly into Android Studio
IDE. Code Style, Formatting
KT-22322Incorrect indent after pressing Enter after annotation entryKT-26377Formatter does not add blank line between annotation and type alias (or secondary constructor)
IDE. Decompiler
KT-25853IDEA hangs when Kotlin bytecode tool window open while editing a class with secondary constructor
IDE. Gradle
KT-26634Do not generate module for metadataMain compilation on new MPP importKT-26675Gradle: Dependency on multiple files gets duplicated on import
IDE. Inspections and Intentions
New Features
KT-17687Quickfix for "Interface doesn't have constructors" to convert to anonymous objectKT-24728Add quickfix to remove single explicit & unused lambda parameterKT-25533An intention to createactualimplementations forexpectmembers annotated with @OptionalExpectationKT-25621Inspections for functions returning SuccessOrFailure- [
KT-25969](https...
1.2.70
Compiler
KT-13860Avoid creating KtImportDirective PSI elements for default imports in LazyImportScopeKT-22201Generate nullability annotations for data class toString and equals methods.KT-23870SAM adapter method returns null-values for "genericParameterTypes"KT-24597IDE doesn't report missing constructor on inheritance of an expected class in common moduleKT-25120RequireKotlin on nested class and its members is not loaded correctlyKT-25193Names of parameters from Java interface methods implemented by delegation are lostKT-25405Mismatching descriptor type parameters on inner typesKT-25604Disable callable references to exprerimental suspend functionsKT-25665Add a warning for annotations which target non-existent accessorsKT-25894Do not generate body for functions from Any in light class builder modeKT-20772Incorrect smart cast on enum membersKT-24657Compiler performance issues with big filesKT-25745Do not report warning about annotations on non-existing accessors for JvmStatic propertiesKT-25746Improve message for warning about annotations that have target to non-existing accessorsKT-25810New Inference: Overload resolution ambiguity on method 'provideDelegate(Nothing?, KProperty<*>)' when there's more than oneprovideDelegateoperator in scopeKT-25973Report metadata version mismatch upon discovering a .kotlin_module file in the dependencies with an incompatible metadata versionKT-22281JVM: Incorrect comparison of Double and Float when types are derived from smart-castsKT-22649Compiler: wrong code generated / Couldn't transform method node - using inline extension property inside lambda
IDE
KT-18301kotlin needs crazy amount of memoryKT-23668Methods with internal visibility have different mangling names in IDE and in compilerKT-24892please remove usages of com.intellij.util.containers.ConcurrentFactoryMap#ConcurrentFactoryMap deprecated long agoKT-25144Quick fix “Change signature” changes class of argument when applied for descendant classes with enabled -Xnew-inference optionKT-25356Update Gradle Kotlin-DSL icon according to new IDEA 2018.2 icons styleKT-20056TCE on creating object of an anonymous class in Kotlin scriptKT-25092SourcePsi should be physical leaf element but got OPERATION_REFERENCEKT-25249Uast operates "Unit" type instead of "void"KT-25255Preferences | Languages & Frameworks | Kotlin Updates: show currently installed versionKT-25297Inconsistency inKotlinULambdaExpressionandKotlinLocalFunctionULambdaExpressionKT-25515Add/remove analysis-related compiler setting does not update IDE project model immediatelyKT-25524UAST: proper resolve for function variable callKT-25640"Configure Kotlin" action changes values of language and API version in project settings
IDE. Debugger
KT-25147Conditional breakpoints doesn't work incommoncode of MPPKT-25152MPP debug doesn't navigate tocommoncode if there are same named files incommonandplatformparts
IDE. Gradle
KT-22732TestNG runner is always used for TestNG tests even when Use Gradle runner is selectedKT-25913Honor 'store generated project files externally option' for Kotlin facets imported from GradleKT-25955Support expect/actual in new MPP imported into IDEA
IDE. Inspections and Intentions
New Features
KT-6633Inspection to detect unnecessary "with" callsKT-25146Add quick-fix for default parameter value removalKT-7675Create inspection to replace if with letKT-13515Add intention to replace '?.let' with null checkKT-13854Need intention actions: to convert property with getter to initializerKT-15476Inspection to convert non-lazy chains of collection functions into sequencesKT-22068Force usage of “it” in .forEach{} callsKT-23445Inspection and quickfix to replaceassertTrue(a == b)withassertEquals(a, b)KT-25270"return@foo" outside of lambda should have quickfix to remove "@foo" label
Fixes
KT-11154Spell checking inspection is not suppressableKT-18681"Replace 'if' with 'when'" generates unnecessary else blockKT-24001"Suspicious combination of == and ===" false positiveKT-24385Convert lambda to reference refactor produces red code with companion objectKT-24694Move lambda out of parentheses should not be applied for multiple functional parametersKT-25089False-positive "Call chain on collection type can be simplified" formapandjoinToStringon aHashMapKT-25169Impossible to suppress UAST/JVM inspectionsKT-25321Safe delete of a class property implementing constructor parameter at the platform side doesn't remove all the related declarationsKT-25539Make class openquick fix doesn't update all the related implementations of a multiplatform classKT-25608Confusing "Redundant override" inspection messageKT-16422Replace lambda with method reference inspections failsKT-21999Convert lambda to reference adds this with incorrect labelKT-23467False positivesuspicious callable referenceon scoping function called on another lambdaKT-25044"Implement member" quick-fix should not generate 'actual' modifier with expect declaration in interface onlyKT-25579Redundant semicolon erroneously reported during local var modifier ambiguityKT-25633“Add kotlin-XXX.jar to the classpath” quick fix adds dependency with invalid version in Gradle-based projectsKT-25739"Convert to run" / "Convert to with" intentions incorrectly process references to Java static membersKT-25928"Let extend" quick fix is suggested in case of nullable/non-null TYPE_MISMATCH collisionKT-26042False positive "Remove redundant '.let' call" for lambda with destructured arguments
IDE. KDoc
KT-22815Update quick documentationKT-22648Quick Doc popup: break (long?) declarations into several lines
IDE. Libraries
KT-25129Idea freezes when Kotlin plugin tries to determine if jar is js lib in jvm module
IDE. Navigation
1.2.70 RC 1
Compiler
KT-20772Incorrect smart cast on enum membersKT-24657Compiler performance issues with big filesKT-25745Do not report warning about annotations on non-existing accessors for JvmStatic propertiesKT-25746Improve message for warning about annotations that have target to non-existing accessorsKT-25810New Inference: Overload resolution ambiguity on method 'provideDelegate(Nothing?, KProperty<*>)' when there's more than oneprovideDelegateoperator in scopeKT-25973Report metadata version mismatch upon discovering a .kotlin_module file in the dependencies with an incompatible metadata version
IDE
KT-20056TCE on creating object of an anonymous class in Kotlin scriptKT-25092SourcePsi should be physical leaf element but got OPERATION_REFERENCEKT-25249Uast operates "Unit" type instead of "void"KT-25255Preferences | Languages & Frameworks | Kotlin Updates: show currently installed versionKT-25297Inconsistency inKotlinULambdaExpressionandKotlinLocalFunctionULambdaExpressionKT-25515Add/remove analysis-related compiler setting does not update IDE project model immediatelyKT-25524UAST: proper resolve for function variable callKT-25640"Configure Kotlin" action changes values of language and API version in project settings
IDE. Gradle
KT-22732TestNG runner is always used for TestNG tests even when Use Gradle runner is selectedKT-25913Honor 'store generated project files externally option' for Kotlin facets imported from GradleKT-25955Support expect/actual in new MPP imported into IDEA
IDE. Inspections and Intentions
New Features
KT-7675Create inspection to replace if with letKT-13515Add intention to replace '?.let' with null checkKT-13854Need intention actions: to convert property with getter to initializerKT-15476Inspection to convert non-lazy chains of collection functions into sequencesKT-22068Force usage of “it” in .forEach{} callsKT-23445Inspection and quickfix to replaceassertTrue(a == b)withassertEquals(a, b)KT-25270"return@foo" outside of lambda should have quickfix to remove "@foo" label
Fixes
KT-16422Replace lambda with method reference inspections failsKT-21999Convert lambda to reference adds this with incorrect labelKT-23467False positivesuspicious callable referenceon scoping function called on another lambdaKT-25044"Implement member" quick-fix should not generate 'actual' modifier with expect declaration in interface onlyKT-25579Redundant semicolon erroneously reported during local var modifier ambiguityKT-25633“Add kotlin-XXX.jar to the classpath” quick fix adds dependency with invalid version in Gradle-based projectsKT-25739"Convert to run" / "Convert to with" intentions incorrectly process references to Java static membersKT-25928"Let extend" quick fix is suggested in case of nullable/non-null TYPE_MISMATCH collisionKT-26042False positive "Remove redundant '.let' call" for lambda with destructured arguments
IDE. KDoc
KT-22648Quick Doc popup: break (long?) declarations into several lines
IDE. Navigation
KT-25498Find Usagesdoesn't showSupertypeusages ofactualdeclarations with constructor
IDE. Refactorings
KT-25857Refactoring → Move moves whole file in case of moving class from Kotlin scriptKT-25858Refactoring → Move can be called only for class declarations in Kotlin script
IDE. Tests Support
KT-26228NoClassDefFoundError: org/jetbrains/kotlin/idea/run/KotlinTestNgConfigurationProducer on running a JUnit test with TestNG plugin disabled
JavaScript
KT-22053JS: Secondary constructor of Throwable inheritor doesn't call to primary oneKT-26064JS inliner calls wrong constructor in incremental buildKT-26117JS runtime error: ArrayList_init instead of ArrayList_init_0
Libraries
KT-18067KotlinJS - String.compareTo(other: String, ignoreCase: Boolean = false): IntKT-19507Using @JvmName from stdlib-common fails to compile in JS module.KT-19508Add @JsName to stdlib-common for controlling JS implementationKT-24478Annotate relevant standard library annotations with @OptionalExpectationKT-25980JvmSynthetic annotation has no description in the docs
Tools. CLI
KT-25196Optional expected annotation is visible in platforms where it doesn't have actual
Tools. Gradle
KT-25025Inter-project IC for JS in Gradle
Tools. Incremental Compile
KT-25455Gradle IC: when class signature is changed its indirect subclasses in different module are not recompiledKT-26528ISE “To save disabled cache status [delete] should be called (this behavior is kept for compatibility)” on compiling project with enabled IC in Maven
Tools. JPS
KT-25998Build process starts compiling w/o any changes (on release version)KT-25977Can not run a Kotlin testKT-26072MPP compilation issueKT-26113Build takes around 20 seconds in already fully built IDEA project
Tools. Scripts
KT-26142update maven-central remote repository url
Changelog for previous release 1.2.70 EAP 1
Kotlin 1.3-M2
1.3-M2
Compiler
New Features
KT-6592Support local variable initialization in lambda arguments to some functionsKT-19323Allow generic type parameter to have mixed constraints for @InlineOnly functionsKT-24857Support compatibility wrappers for coroutines in compilerKT-25320Support limited conversions for constants to simplify interop for Kotlin/NativeKT-25372Support JvmName on annotation property gettersKT-25495Release contract DSL as experimentalKT-25557Metadata that maps coroutine label to the file name and line numberKT-25559Metadata that maps coroutine spilled state to local variablesKT-25655Safe or non-null calls required on x following check(x != null)KT-25972Support reading binary metadata of the next major release
Performance Improvements
KT-24657Compiler performance issues with big filesKT-26243Avoid redundant "specialized" method for suspend lambdas.
Fixes
KT-19628Unresolved reference not reported on data class constructor@getannotationKT-20830Nulls can propagate through "enhanced nullability" types on module boundariesKT-21240Remove suspendCoroutineOrReturn intrinsic from compilerKT-22379Condition of while-loop with break can produce unsound smartcastKT-23438Back-end (JVM) Internal error: Failed to generate function suspendCoroutineOrReturnKT-23819Inline classes: mapping of fully generic classesKT-23857Annotation with target TYPE is not applicable to TYPE_USE in Java sourcesKT-24717Allow number literals to be used as unsigned ones with unsigned expected typedKT-24860Forbid usage function expression as suspend function expressionKT-24872Do not generate user-defined methods inside box class of inline classKT-24873Generate equals/hashCode/toString methods for inline classes same as for data classesKT-25246Incorrect bytecode generated for secondary constructor in inline class + primitive arrayKT-25278No smart cast for "returns() implies" contract when default argument is omittedKT-25287Getter-targeted annotations on annotation constructor parameters are lostKT-25293“Couldn't transform method node” error on compiling inline class with hashCode() method call when underlying value type is basic (number, char, boolean)KT-25299NoSuchMethodError Foo$Erased.hashCode(Ljava/lang/Object;) for hashCode(), toString() and equals() methods in inline classesKT-25328“Couldn't transform method node” error on compiling inline class which is wrapping Unit typeKT-25330CCE “[Ljava.lang.Integer; cannot be cast to Foo” for inline class which is wrapping ArrayKT-25521Coroutines state machine in Kotlin 1.3 should not have getLabel/setLabelKT-25558Stabilize field naming and mangling for suspending lambda classesKT-25580No warning about experimental API when unsigned types are inferredKT-25599“Exception during code generation” on compiling code with public constructor of unsigned numbers arrayKT-25614Support secondary constructors for inline classesKT-25683Compiler support for calling experimental suspend functions and function with experimental suspend function type as parameterKT-25688Add $continuation to LVTKT-25750CCE “Foo cannot be cast to java.lang.String” with inline classKT-25760Inline data class throws java.lang.VerifyError when trying toString() itKT-25794Incorrect code generated for accessing elements of Array where C is inline classKT-25824Move SuspendFunctionN fictitious interfaces to kotlin.coroutines packageKT-25825Allow to distinguish instances of function types from instances of suspend function types via kotlin.coroutines.jvm.internal.SuspendFunction marker interfaceKT-25912Calling groupingBy+reduce from suspend function causes IncompatibleClassChangeErrorKT-25914'==' for inline class with custom 'equals' uses underlying primitive type comparison insteadKT-25973Report metadata version mismatch upon discovering a .kotlin_module file in the dependencies with an incompatible metadata versionKT-25981Incorrect code generated for unboxed to boxed inline class equalityKT-25983Inline class equality uses IEEE 754 instead of total orderKT-26029Prohibit delegated properties inside inline classesKT-26030Prohibit implementation by delegation for inline classesKT-26052Inline Classes: IllegalArgumentException when underlying type is non-null but declared type is nullableKT-26101Prohibit inline classes with recursive underlying typesKT-26103Inline class with type parameters is inconsistently mapped to JVM type if underlying type is a primitiveKT-26120Inline Classes: Class inheritance is allowed but fails when referencing a superclass member
IDE
KT-25316PARTIAL resolve mode doesn't work when effects system is enabledKT-25611With Language / API version = "Latest stable" installing 1.3-M1 plugin upgrades actual values to 1.3KT-25681Remove "Coroutines (experimental)" settings from IDE and do not pass-Xcoroutinesto JPS compiler (since 1.3)KT-25714Kotlin plugin updater suggests plugins incompatible with current Studio build platformKT-26239New MPP template: addkotlin-testlibraries to the modules dependencies by defaultKT-26290Gradle Import: When all modules have the same language/API version use it for project-level settings as well
IDE. Completion
KT-25275Code completion does not take into account smart casts gotten from "returns implies" contract
IDE. Inspections and Intentions
KT-22330"Add remaining branch" quickfix doesn't properly import enum classKT-22354"Add remaining branches with import" quick fix causes KNPE at ImportAllMembersIntention$Companion.importReceiverMembers()KT-26158KNPE in "Create local variable"
IDE. Multiplatform
KT-26217"org.jetbrains.kotlin.resolve.MultiTargetPlatform$Common cannot be cast to org.jetbrains.kotlin.resolve.MultiTargetPlatform$Specific" on splitted actuals
IDE. Script
KT-25814IDE scripting console -> kotlin (JSR-223) - compilation errors - unresolved IDEA classesKT-25822jvmTarget from the script compiler options is ignored in the IDE
JavaScript
Kotlin 1.2.61
IDE
KT-25622IDE support for RecentlyNullable/RecentlyNonNullKT-26036Kotlin 1.2.60 LightAnnotations and Lombok
IDE. Gradle
KT-20363No "Run" icon on the left for tests in common part of a multi-platform project
Tools. Android Extensions
KT-25839Parcelize generates infinite recursive loop
Tools. JPS
KT-26095Kotlin facet UI, JS: "Enable incremental compilation (experimental)" should be visible only in project setting
Tools. kapt
KT-24714java.lang.IllegalStateException: The provided plugin org.jetbrains.kotlin.kapt3.Kapt3ComponentRegistrar is not compatible with this version of compiler
1.2.70 EAP 1
Compiler
KT-13860Avoid creating KtImportDirective PSI elements for default imports in LazyImportScopeKT-22201Generate nullability annotations for data class toString and equals methods.KT-23870SAM adapter method returns null-values for "genericParameterTypes"KT-24597IDE doesn't report missing constructor on inheritance of an expected class in common moduleKT-25120RequireKotlin on nested class and its members is not loaded correctlyKT-25193Names of parameters from Java interface methods implemented by delegation are lostKT-25405Mismatching descriptor type parameters on inner typesKT-25604Disable callable references to exprerimental suspend functionsKT-25665Add a warning for annotations which target non-existent accessorsKT-25894Do not generate body for functions from Any in light class builder mode
IDE
KT-18301kotlin needs crazy amount of memoryKT-23668Methods with internal visibility have different mangling names in IDE and in compilerKT-24892please remove usages of com.intellij.util.containers.ConcurrentFactoryMap#ConcurrentFactoryMap deprecated long agoKT-25144Quick fix “Change signature” changes class of argument when applied for descendant classes with enabled -Xnew-inference optionKT-25356Update Gradle Kotlin-DSL icon according to new IDEA 2018.2 icons style
IDE. Debugger
KT-25147Conditional breakpoints doesn't work incommoncode of MPPKT-25152MPP debug doesn't navigate tocommoncode if there are same named files incommonandplatformparts
IDE. Inspections and Intentions
New Features
KT-6633Inspection to detect unnecessary "with" callsKT-25146Add quick-fix for default parameter value removal
Fixes
KT-11154Spell checking inspection is not suppressableKT-18681"Replace 'if' with 'when'" generates unnecessary else blockKT-24001"Suspicious combination of == and ===" false positiveKT-24385Convert lambda to reference refactor produces red code with companion objectKT-24694Move lambda out of parentheses should not be applied for multiple functional parametersKT-25089False-positive "Call chain on collection type can be simplified" formapandjoinToStringon aHashMapKT-25169Impossible to suppress UAST/JVM inspectionsKT-25321Safe delete of a class property implementing constructor parameter at the platform side doesn't remove all the related declarationsKT-25539Make class openquick fix doesn't update all the related implementations of a multiplatform classKT-25608Confusing "Redundant override" inspection message
IDE. KDoc
KT-22815Update quick documentation
IDE. Libraries
KT-25129Idea freezes when Kotlin plugin tries to determine if jar is js lib in jvm module
IDE. Navigation
KT-25317Go to actual declarationkeyboard shortcut doesn't work forexpect object, showing "No implementations found" messageKT-25492Find usages: keepExpected functionsoption state while searching for usages of a regular function
IDE. Project View
KT-22823Text pasted into package is parsed as Kotlin before Java
IDE. Refactorings
KT-22072"Convert MutableMap.put to assignment" should not be applicable when put is used as expressionKT-23590Incorrect conflict warning "Internal function will not be accessible" when moving class from jvm to common moduleKT-23594Incorrect conflict warning about IllegalStateException when moving class from jvm to common moduleKT-23772MPP: Refactor / Rename class does not update name of file containing related expect/actual classKT-23914Safe search false positives during moves between common and actual modulesKT-25326Refactor/Safe Delete doesn't reportactual objectusagesKT-25438Refactor/Safe delete of a multiplatform companion object: usage is not reported
IDE. Script
KT-25814IDE scripting console -> kotlin (JSR-223) - compilation errors - unresolved IDEA classesKT-25822jvmTarget from the script compiler options is ignored in the IDE
IDE. Ultimate
KT-25595Rename Kotlin-specific "Protractor" run configuration to distinguish it from the one provided by NodeJS plugin
Reflection
KT-25541Incorrect parameter names in reflection for inner class constructor from Java class compiled with "-parameters"
Tools. CLI
KT-21910Add-Xfriend-pathscompiler argument to support internal visibility checks in production/test sources from external build systemsKT-25554Do not report warnings when-XXLanguagewas used to turn on deprecation
Tools. JPS
KT-25540JPS JS IC does not recompile usages from other modules when package is different
Tools. kapt
KT-25396KAPT Error: Unknown option: infoAsWarnings
Kotlin 1.2.60
1.2.60
Native compiler binaries
We have now not only the JVM version of Kotlin compiler but also one native system dependent version for every major platform (Linux, macOS, and Windows). Those binaries are built with Excelsior JET AOT compiler (https://www.excelsiorjet.com/) and have faster startup time which is suitable for building small files or scripts.
How to use it:
kotlinc [Runtime options and properties] [-args Kotlin compiler arguments]
Please notice that you need to prepend kotlin compiler arguments with -args unlike in JVM version.
Some examples:
kotlinc -args -kotlin-home <path>
kotlinc -Xmx512m -args hello.kt -d hello.jar
kotlinc -args -script list_folders.kts <script arguments>
Compiler
KT-13762Prohibit annotations with target 'EXPRESSION' and retention 'BINARY' or 'RUNTIME'KT-18882Allow code to have platform specific annotations when compiled for different platformsKT-20356Internal compiler error - This method shouldn't be invoked for INVISIBLE_FAKE visibilityKT-22517Deprecate smartcasts for local delegated propertiesKT-23153Compiler allows to set non constant value as annotation parameterKT-23413IndexOutOfBoundsException on local delegated properties fromprovideDelegateif there's at least one non-local delegated propertyKT-23742Optimise inline class redundant boxing on return from inlined lambdaKT-24513High memory usage in Kotlin and 2018.1KT-24617Optional expected annotation is unresolved in a dependent platform moduleKT-24679KotlinUCallExpression doesn't resolve callee if it is an inline methodKT-24808NI: nestedwithContextcall is reported withSuspension functions can be called only within coroutine bodyerrorKT-24825NoClassDefFoundError on SAM adapter in a nested call in inlined lambda since 1.2.40KT-24859Disallow calls of functions annotated with receiver annotated with @RestrictsSuspension in foreign suspension contextKT-24911Kotlin 1.2.50: UI for @RecentlyNonNull looks strange in the editorKT-25333Restrict visibility of Java static members from supertypes of companion object
IDE
Performance Improvements
KT-20924Slow KtLightAbstractAnnotation.getClsDelegate() lightAnnotations.ktKT-23844Kotlin property accessor searcher consumes CPU when invoked on a scope consisting only of Java files
Fixes
KT-4311"Override members" works wrong when function is extensionKT-13948IDE plugins: improve descriptionKT-15300"INFO - project.TargetPlatformDetector - Using default platform" flood in logKT-17350Implement members from interface fails when one of the generic types is unresolvedKT-17668Edit Configuration dialog doesn't have a button for choosing the "Main class" fieldKT-19102Wrong equals() and hashCode() code generated for arrays of arraysKT-20056TCE on creating object of an anonymous class in Kotlin scriptKT-21863Imported typealias to object declared as "Unused import directive" when only referring to methodsKT-23272Git commit not workingKT-23407Pasting callable reference from different package suggests imports, but inserts incompilable FQNKT-23456UAST: Enum constant constructor call arguments missing from Kotlin enumsKT-23942Fix building light-classes for MPP project containing multi-file facadesKT-24072Kotlin SDK appears as many times as there are modules in the projectKT-24412Kotlin create project wizard: Kotlin/JS no SDKKT-24933please remove usages of com.intellij.psi.search.searches.DirectClassInheritorsSearch#search(com.intellij.psi.PsiClass, com.intellij.psi.search.SearchScope, boolean, boolean) deprecated long agoKT-24943Project leak via LibraryEffectiveKindProviderImplKT-24979IndexNotReadyException in KtLightClassForSourceDeclaration#isInheritorKT-24958Escaping goes insane when editing interpolated string in injected fragment editorKT-25024Wrong resolve scope while resolving java.lang.String PsiClassReferenceTypeKT-25092SourcePsi should be physical leaf element but got OPERATION_REFERENCEKT-25242'Resolved to error element' highlighting is confusingly similar to an active live templateKT-25249Uast operates "Unit" type instead of "void"KT-25255Preferences | Languages & Frameworks | Kotlin Updates: show currently installed versionKT-25297Inconsistency inKotlinULambdaExpressionandKotlinLocalFunctionULambdaExpressionKT-25414Support checking eap-1.3 channel for updatesKT-25524UAST: proper resolve for function variable callKT-25546Create popup in 1.2.x plugin if user upgrade version in gradle or maven to kotlin 1.3
IDE. Android
KT-17946Android Studio: remove Gradle configurator on configuring KotlinKT-23040Wrong run configuration classpath in a mixed Java/Android projectKT-24321Actual implementations from Android platform module are wrongly reported withno corresponding expected declarationin IDEKT-25018ExceptionDependencies for org.jetbrains.kotlin.resolve.calls.* cannot be satisfiedon a simple project in AS 3.2 Canary
IDE. Code Style, Formatting
KT-14066Comments on when branches are misplacedKT-25008Formatter: Use single indent for multiline elvis operator
IDE. Completion
KT-23627Autocompletion inserts FQN of stdlib functions inside of scoping lambda called on explicitthisKT-25239Add postfix template for listOf/setOf/etc
IDE. Debugger
KT-23162Evaluate expression in multiplatform common test fails with JvmName missing when run in JVMKT-24903Descriptors leak fromKotlinMethodSmartStepTarget
IDE. Decompiler
KT-23981Kotlin bytecode decompiler works in AWT thread
IDE. Gradle
KT-24614Gradle can't get published versions until commenting repositories in settings.gradle
IDE. Gradle. Script
KT-24588Multiple Gradle Kotlin DSL script files dependencies lifecycle is flawed
IDE. Hints
KT-22432Type hints: Don't include ".Companion" in the names of types defined inside companion objectKT-22653Lambda return hint is duplicated for increment/decrement expressionsKT-24828Double return hints on labeled expressions
IDE. Inspections and Intentions
New Features
Kotlin 1.2.60 RC2
Compiler
KT-22517Deprecate smartcasts for local delegated propertiesKT-24911Kotlin 1.2.50: UI for @RecentlyNonNull looks strange in the editorKT-25333Restrict visibility of Java static members from supertypes of companion object
IDE
KT-15300"INFO - project.TargetPlatformDetector - Using default platform" flood in logKT-24979IndexNotReadyException in KtLightClassForSourceDeclaration#isInheritorKT-25242'Resolved to error element' highlighting is confusingly similar to an active live templateKT-25414Support checking eap-1.3 channel for updatesKT-25524UAST: proper resolve for function variable call
IDE. Android
KT-17946Android Studio: remove Gradle configurator on configuring Kotlin
IDE. Refactorings
KT-23983Extract function: Reified type parameters are not extracted properly
IDE. Script
KT-25373Deadlock in idea plugin
Language design
KT-13762Prohibit annotations with target 'EXPRESSION' and retention 'BINARY' or 'RUNTIME'
Libraries
KT-25351TestNGAsserterneeds to swap expected/actual
Tools. Android Extensions
KT-22576Parcelable: Allow Parcelize to work with object and enum typesKT-24459@IgnoredOnParcel annotation doesn't work for @parcelizeKT-24720Parcelable: java.lang.LinkageError
Tools. Compiler Plugins
KT-23808Array in @parcelize class generates an java.lang.VerifyError
Tools. JPS
KT-22611Support compiling scripts in JPS
Tools. kapt
KT-24313Unable to use KAPT when dependency to it is added to buildSrcKT-24449'kapt.kotlin.generated' is not marked as source root in Android Studio 3.1 and 3.2KT-24919Caused by: org.gradle.api.InvalidUserDataException: 'projectDir' is not a fileKT-24963gradle kapt plugin's assumption on build dir causing duplicate class errorKT-24985Kapt: Allow to disable info->warning mapping in loggerKT-25071kapt sometimes emits java stubs with imports that should be static imports
Kotlin 1.3-M1
1.3-M1
Language design
KEEP-104Inline classesKEEP-135Unsigned integer typesKEEP-95Experimental API annotationsKT-13762Prohibit annotations with target 'EXPRESSION' and retention 'BINARY' or 'RUNTIME'KT-16681kotlin allows mutating the field of read-only propertyKT-21515Restrict visibility of classifiers, nested in companion objects
Compiler
KT-24848Refine loading Java overrides of Kotlin suspend functionsKT-9580Report an error if 'setparam' target does not make sense for a parameter declarationKT-16310Nested classes inside enum entries capturing outer membersKT-17981Type parameter for catch parameter possible when exception is nested in generic, but fails in runtimeKT-21354Inconsistent behavior of 'for-in-range' loop if range is an array variable modified in loop bodyKT-25333Restrict visibility of Java static members from supertypes of companion objectKT-25623Do not load experimental coroutines as non-suspend function with additional Continuation parameter
Backend. JVM
KT-6301Support JvmStatic annotation on interface companion object membersKT-25508Inject probeCoroutineSuspended to coroutines bodyKT-18987Unroll recursion in CoroutineImpl.resumeKT-11567Companion object INSTANCE field more visible than companion object class itselfKT-13764Support lambdas and function references for arities bigger than 22KT-16615Do not generate ConstantValue attribute for non-const valsKT-25193Names of parameters from Java interface methods implemented by delegation are lostKT-25324VerifyError “Bad type on operand stack” on running code with call of array iterator for array of inline classesKT-25325CCE “Foo cannot be cast to java.lang.String” for iterating over the list of inline classesKT-25626Inline class values inside string literals don't use their own toString implementation
Backend. JVM. Coroutines
KT-20219Inline suspend function can't be used as non-inline functionKT-24863Support new Continuation API in JVM BEKT-24864Create new CoroutineImpl and other internal coroutines interfaces
Backend. JVM. Inline
KT-25511Inline classes fail with cross-inline functions
Binary Metadata
KT-24617Optional expected annotation is unresolved in a dependent platform moduleKT-25120RequireKotlin on nested class and its members is not loaded correctlyKT-25273java.lang.UnsupportedOperationException from incremental JS compilationKT-25310Write isUnsigned flag into metadata for unsigned types
Frontend
KT-15807@JvmField is not applicable to interface companion propertiesKT-16962Annotation classes cannot contain types or static fields because they cannot have a bodyKT-23153Compiler allows to set non constant value as annotation parameterKT-23362Move coroutines to package kolin.coroutines for 1.3KT-24861Fix loading kotlin.suspend compiled with LV=1.2 when release coroutines package is usedKT-25241Kotlin compiler doesn't warn about usage of lambda/reference with more than 22 parametersKT-25600NSEE “Collection is empty” after trying to call default constructor of unsigned number class
Frontend. Data-flow analysis
KT-22517Deprecate smartcasts for local delegated properties
Frontend. Declarations
KT-19618Data classcopy()call with optional parameters leads to broken code when the class implements an interface withcopy()KT-23277Prohibit local annotation classesKT-24197Make 'mod' operator error in 1.3
Frontend. Lexer & Parser
KT-24663Add 'UL' suffix to represent number literals of unsigned Long type
Frontend. Resolution and Inference
KT-16908Support callable references to suspending functionsKT-20588Report error on single element assignment to varargs in named form in annotationsKT-20589Report error on single element assignment to varargs in named form in functionsKT-24859Disallow calls of functions annotated with receiver annotated with @RestrictsSuspension in foreign suspension context
IDE
KT-25466Make coroutines resolve to be independent of language and API versions set inKotlin Compilersettings
IDE. Inspections and Intentions
KT-24243Support quick fix to enable usages of Experimental/UseExperimentalKT-11154Spell checking inspection is not suppressableKT-25169Impossible to suppress UAST/JVM inspections
IDE. Libraries
KT-25129Idea freezes when Kotlin plugin tries to determine if jar is js lib in jvm module
Libraries
New Features
KEEP-131,KT-17261Add random number generator to stdlib and related collection extension functionsKT-7922Companion object for BooleanKT-8247Byte size for primitivesKT-16552Add Sequence.orEmpty()KT-18559Make SafeContinuation and context impl classes serializableKT-18910StringBuilder#setLength(0) in non-JVM KotlinKT-21763Provide Char MIN_VALUE/MAX_VALUE constantsKT-23279isNullOrEmpty() for collections, maps, and arraysKT-23602Make kotlin.Metadata public
Fixes
KT-23564KotlinJS: Math is deprecated yet random is not a global functionKT-24856Create compatibility wrappers for migration from 1.2 to 1.3 coroutinesKT-24862Create new Continuation API for coroutines
Reflection
KT-25541Incorrect parameter names in reflection for inner class constructor from Java class compiled with "-parameters"
Kotlin 1.2.60 RC
Compiler
KT-18882Allow code to have platform specific annotations when compiled for different platformsKT-24617Optional expected annotation is unresolved in a dependent platform moduleKT-24825NoClassDefFoundError on SAM adapter in a nested call in inlined lambda since 1.2.40
IDE
KT-25249Uast operates "Unit" type instead of "void"KT-25297Inconsistency inKotlinULambdaExpressionandKotlinLocalFunctionULambdaExpression
IDE. Completion
KT-23627Autocompletion inserts FQN of stdlib functions inside of scoping lambda called on explicitthisKT-25239Add postfix template for listOf/setOf/etc
IDE. Gradle. Script
KT-24588Multiple Gradle Kotlin DSL script files dependencies lifecycle is flawed
IDE. Inspections and Intentions
KT-25238Add quickfix wrapping expression into listOf/setOf/etc in case of type mismatch
Libraries
KT-24204Empty progression last value overflows resulting in progression being non-empty
Tools. Gradle
KT-24946ISE: "The provided plugin org.jetbrains.kotlin.scripting.compiler.plugin.ScriptingCompilerConfigurationComponentRegistrar is not compatible with this version of compiler" when build simple Gradle with Zulu JDK
Tools. Incremental Compile
KT-25051Change in "kotlin-android" project w/o package parts causes non-incremental compilation of dependent modules