Skip to content

Releases: JetBrains/kotlin

1.2-RC2

23 Nov 22:17
Compare
Choose a tag to compare
1.2-RC2 Pre-release
Pre-release

Compiler

  • KT-20844 VerifyError on Android after upgrading to 1.2.0-beta-88
  • KT-20895 NPE in Kotlin 1.2-beta88 PseudocodeVariablesData.kt:337
  • KT-21377 Create fallback flag for "Illegal smart cast is allowed after assignment in try block"

IDE

  • KT-18719 Configure Kotlin in Gradle project to 1.2-Mx: add repository mavenCentral() to buildscript
  • KT-20782 Exception when working with routing in ktor (non-atomic trees update)
  • KT-20966 ISE: Facade class not found from Kotlin test files
  • KT-20967 Kotlin plugin upgrade breaks Gradle refresh
  • KT-20990 String literal in string template causes ISE
  • KT-21028 Add kotlin-stdlib-jre7/8 instead of kotlin-stdlib-jdk7/8 for Kotlin versions below 1.2
  • KT-21383 Unsupported method: Library.getProject() when importing Anko project
  • Downgrade "use expression body" inspection to INFORMATION default level

IDE. Debugger

  • KT-20962 NullPointerException because of nullable location in debugger

IDE. Inspections and Intentions

  • KT-20803 Create actual declaration in the same source root as expect declaration

IDE. Refactorings

  • KT-20979 Move class refactoring doesn't work anymore

Libraries

  • Remove deprecated pairwise function

Tools. Gradle

  • KT-21395 “Unable to load class 'kotlin.collections.CollectionsKt'” on creating gradle project in IDEA 2016.3.7

Tools. kapt

  • Add kotlin-annotation-processing-embeddable artifact (compatible with kotlin-compiler-embeddable)
  • Return kotlin-annotation-processing artifact back (compatible with CLI Kotlin compiler)

Previous releases

This release also includes the fixes and improvements from the previous
1.2-RC1 release.

1.1.60

13 Nov 16:55
Compare
Choose a tag to compare
  • Adds experimental support for Kotlin/JS incremental compilation
  • Adds new features to JSR-305 custom nullability annotations support
  • Brings a lot of bug fixes in the automatic Parcelable implementation generator and provides it with IDE support
  • Improves Gradle incremental builds
  • Introduces new inspections, performance improvements and bug fixes in the IntelliJ plugin

The complete list of changes in this release can be found in the changelog.

The update is compatible with all versions of IntelliJ IDEA from 2016.3 until 2017.3, as well as with Android Studio 2.3, 3.0 and 3.1 Canary.

1.2-RC

02 Nov 19:37
Compare
Choose a tag to compare
1.2-RC Pre-release
Pre-release

Compiler

Fixes

  • KT-20774 "::foo.isInitialized" for lateinit member properties produces incorrect bytecode
  • KT-20826 Can't compile Ultimate Idea with Kotlin 1.2
  • KT-20879 Compiler problem in when-expressions
  • KT-20959 Regression: Unexpected diagnostic NINITIALIZED_ENUM_COMPANION reported in 1.1.60 & 1.2.0-rc
  • KT-20651 Don't know how to generate outer expression" for enum-values with non-trivial self-closures

IDE

New Features

  • KT-20286 "Configure Kotlin in project" should add kotlin-stdlib-jdk7/8 instead of kotlin-stdlib-jre7/8 starting from Kotlin 1.2

Fixes

  • KT-19599 No indentation for multiline collection literal
  • KT-20346 Can't build tests in common code due to missing org.jetbrains.kotlin:kotlin-test-js testCompile dependency in JS
  • KT-20550 Spring: "Navigate to autowired candidates" gutter action is missed (IDEA 2017.3)
  • KT-20566 Spring: "Navigate to the spring beans declaration" gutter action for @ComponentScan is missed (IDEA 2017.3)
  • KT-20843 Kotlin TypeDeclarationProvider may stop other declarations providers execution
  • KT-20906 Find symbol by name doesn't work
  • KT-20920 UAST: SOE Thrown in JavaColorProvider
  • KT-20922 Couldn't match ClsMethodImpl from Kotlin test files
  • KT-20929 Import Project from Gradle wizard: the same page is shown twice
  • KT-20833 MP project: add dependency to kotlin-test-annotation-common to common module

IDE. Completion

  • KT-18458 Spring: code completion does not suggest bean names inside @Qualifier before function parameter

IDE. Inspections and Intentions

  • KT-20899 Code Cleanup fails to convert Circlet codebase to 1.2
  • KT-20949 CCE from UAST (File breadcrumbs don't update when file tree does)

IDE. Refactorings

  • KT-20251 Kotlin Gradle script: Refactor → Inline works incorrect when you need to inline all function occurrences

JavaScript

  • KT-2976 Suggestion for cleaner style to implement !! operator
  • KT-5259 JS: RTTI may be break by overwriting constructor field
  • KT-17475 JS: object and companion object named "prototype" cause exceptions
  • KT-18095 JS: Wrong behavior of fun named "constructor"
  • KT-18105 JS: inner class "length" cause runtime exception
  • KT-20625 JS: Interface function with default parameter, overridden by other interface cannot be found at runtime
  • KT-20820 JS: IDEA project doesn't generate paths relative to .map

Libraries

  • KT-4900 Finalize math operation parameter names

Tools. JPS

  • KT-20852 IllegalArgumentException: URI has an authority component on attempt to jps compile the gradle project with javascript module

Tools. kapt

  • KT-20877 Butterknife: UninitializedPropertyAccessException: "lateinit property has not been initialized" for field annotated with @BindView.

Previous releases

This release also includes the fixes and improvements from the previous
1.2-Beta2 release.

1.1.60-eap-43

26 Oct 15:33
Compare
Choose a tag to compare
1.1.60-eap-43 Pre-release
Pre-release

What's new

  • Bug fixes and further improvements in support for JSR-305 nullability annotations:
    • Type qualifier defaults can now be used with ElementType.TYPE_USE to provide nullability information for types in all positions including type arguments, upper bounds of type parameters and wildcard types
    • Migration status of custom nullability annotations can be controlled with the @UnderMigration annotation (packaged in a new artifact kotlin-annotations-jvm)
    • Support for fine-grained migration status control on the library user side with the compiler configuration flag -Xjsr305
  • Experimental support for Kotlin/JS incremental compilation in Gradle builds; it is disabled by default and can be enabled by setting kotlin.incremental.js = true in gradle.properties or local.properties
  • Bug fixes in Parcelable implementation generation with @Parcelize
  • Lots of bug fixes in the compiler and IDE
  • New inspections, performance improvements and bugfixes in the IntelliJ plugin
  • Other improvements in support for Gradle incremental builds

Full changelog

1.2-Beta2

19 Oct 08:36
Compare
Choose a tag to compare
1.2-Beta2 Pre-release
Pre-release

CHANGELOG

1.2-Beta2

Multiplatform projects

New Features

  • KT-20616 Compiler options for KotlinCompileCommon task
  • KT-15522 Treat expect classes without explicit constructors as not having constructors at all
  • KT-16099 Do not require obvious override of super-interface methods in non-abstract expect class
  • KT-20618 Rename implement to expectedBy in gradle module dependency

Fixes

  • KT-16926 'implement' dependency is not transitive when importing gradle project to IDEA
  • KT-20634 False error about platform project implementing non-common project
  • KT-19170 Forbid private expected declarations
  • KT-20431 Prohibit inheritance by delegation in 'expect' classes
  • KT-20540 Report errors about incompatible constructors of actual class
  • KT-20398 Do not highlight declarations with not implemented implementations with red during typing
  • KT-19937 Support "implement expect class" quickfix for nested classes
  • KT-20657 Actual annotation with all parameters that have default values doesn't match expected annotation with no-arg constructor
  • KT-20680 No actual class member: inconsistent modality check
  • KT-18756 multiplatform project: compilation error on implementation of extension property in javascript client module
  • KT-17374 Too many "expect declaration has no implementation" inspection in IDE in a multi-platform project
  • KT-18455 Multiplatform project: show gutter Navigate to implementation on expect side of method in the expect class
  • KT-19222 Useless tooltip on a gutter icon for expect declaration
  • KT-20043 multiplatform: No H gutter if a class has nested/inner classes inherited from it
  • KT-20164 expect/actual navigation does not work when actual is a typealias
  • KT-20254 multiplatform: there is no link between expect and actual classes, if implementation has a constructor when expect doesn't
  • KT-20309 multiplatform: ClassCastException on mouse hovering on the H gutter of the actual secondary constructor
  • KT-20638 Context menu in common module: NSEE: "Collection contains no element matching the predicate." at KotlinRunConfigurationProducerKt.findJvmImplementationModule()
  • KT-18919 multiplatform project: expect keyword is lost on converting to object
  • KT-20008 multiplatform: Create expect class implementation should add actual keyword at secondary constructors
  • KT-20044 multiplatform: Create expect class implementation should add actual constructor at primary constructor
  • KT-20135 "Create expect class implementation" should open created class in editor
  • KT-20163 multiplatform: it should be possible to create an implementation for overloaded method if for one method implementation is present already
  • KT-20243 multiplatform: quick fix Create expect interface implementation should add actual keyword at interface members
  • KT-20325 multiplatform: Quick fix Create actual ... should specify correct classifier name for object, enum class and annotation class

Compiler

New Features

  • KT-16028 Allow to have different bodies of inline functions inlined depending on apiVersion

Performance Improvements

  • KT-20462 Don't create an array copy for '*(...)'

Fixes

  • KT-13644 Information from explicit cast should be used for type inference
  • KT-14697 Use-site targeted annotation is not correctly loaded from class file
  • KT-17981 Type parameter for catch parameter possible when exception is nested in generic, but fails in runtime
  • KT-19251 Stack spilling in constructor arguments breaks Quasar
  • KT-20387 Wrong argument generated for accessor call of a protected generic 'operator fun get/set' from base class with primitive type as type parameter
  • KT-20491 Incorrect synthetic accessor generated for a generic base class function specialized with primitive type
  • KT-20651 "Don't know how to generate outer expression" for enum-values with non-trivial self-closures
  • KT-20752 Do not register new kinds of smart casts for unstable values

IDE

New Features

  • KT-19146 Parameter hints could be shown for annotation

Fixes

  • KT-19207 "Configure Kotlin in project" should add "requires kotlin.stdlib" to module-info for Java 9 modules
  • KT-19213 Formatter/Code Style: space between type parameters and where is not inserted
  • KT-19216 Parameter name hints should not be shown for functional type invocation
  • KT-20448 Exception in UAST during reference search in J2K
  • KT-20543 java.lang.ClassCastException on usage of array literals in Spring annotation
  • KT-20709 Loop in parent structure when converting a LITERAL_STRING_TEMPLATE_ENTRY

IDE. Completion

  • KT-17165 Support array literals in annotations in completion

IDE. Debugger

  • KT-18775 Evaluate expression doesn't allow access to properties of private nested objects, including companion

IDE. Inspections and Intentions

New Features

  • KT-20108 Support "add requires directive to module-info.java" quick fix on usages of non-required modules in Kotlin sources
  • KT-20410 Add inspection for listOf().filterNotNull() to replace it with listOfNotNull()

Fixes

  • KT-16636 Remove parentheses after deleting the last unused constructor parameter
  • KT-18549 "Add type" quick fix adds non-primitive Array type for annotation parameters
  • KT-18631 Inspection to convert emptyArray() to empty literal does not work
  • KT-18773 Disable "Replace camel-case name with spaces" intention for JS and common projects
  • KT-20183 AE “Classifier descriptor of a type should be of type ClassDescriptor” on adding element to generic collection in function
  • KT-20315 "call chain on collection type may be simplified" generates code that does not compile

JavaScript

Fixes

  • KT-8285 JS: don't generate tmp when only need one component
  • KT-8374 JS: some Double values converts to Int differently on JS and JVM
  • KT-14549 JS: Non-local returns from secondary constructors don't work
  • KT-15294 JS: parse error in js() function
  • KT-17629 JS: Equals function (==) returns true for all primitive numeric types
  • KT-17760 JS: Nothing::class throws error
  • KT-17933 JS: toString, hashCode method and simplename property of KClass return senseless results for some classes
  • KT-18010 JS: JsName annotation in interfaces can cause runtime exception
  • KT-18063 Inlining does not work properly in JS for suspend functions from another module
  • KT-18548 JS: wrong string interpolation with generic or Any parameters
  • KT-19772 JS: wrong boxing behavior for...
Read more

1.2-Beta

29 Sep 15:13
Compare
Choose a tag to compare
1.2-Beta Pre-release
Pre-release

Android

New Features

Fixes

  • KT-19747 Android extensions + Parcelable: VerifyError in case of RawValue annotation on a type when it's unknown how to parcel it
  • KT-19899 Parcelize: Building with ProGuard enabled
  • KT-19988 [Android Extensions] inner class LayoutContainer causes NoSuchMethodError
  • KT-20002 Parcelize explodes on LongArray
  • KT-20019 Parcelize does not propogate flags argument when writing nested Parcelable
  • KT-20020 Parcelize does not use primitive array read/write methods on Parcel
  • KT-20021 Parcelize does not serialize Parcelable enum as Parcelable
  • KT-20022 Parcelize should dispatch directly to java.lang.Enum when writing an enum.
  • KT-20034 Application installation failed (INSTALL_FAILED_DEXOPT) in Android 4.3 devices if I use Parcelize
  • KT-20057 Parcelize should use specialized write/create methods where available.
  • KT-20062 Parceler should allow otherwise un-parcelable property types in enclosing class.
  • KT-20170 UAST: Getting the location of a UIdentifier is tricky

Compiler

  • KT-4565 Support smart casting of safe cast's subject (and also safe call's receiver)
  • KT-8492 Null check should work after save call with elvis in condition
  • KT-9327 Need a way to check whether a lateinit property was assigned
  • KT-14138 Allow lateinit local variables
  • KT-15461 Allow lateinit top level properties
  • KT-7257 NPE when accessing properties of enum from inner lambda on initialization
  • KT-9580 Report an error if 'setparam' target does not make sense for a parameter declaration
  • KT-16310 Nested classes inside enum entries capturing outer members
  • KT-20155 Confusing diagnostics on a nested interface in inner class

IDE

  • KT-14175 Surround with try ... catch (... finally) doesn't work for expressions
  • KT-20308 New Gradle with Kotlin DSL project wizard
  • KT-18353 Support UAST for .kts files
  • KT-19823 Kotlin Gradle project import into IntelliJ: import kapt generated classes into classpath
  • KT-20185 Stub and PSI element type mismatch for "var nullableSuspend: (suspend (P) -> Unit)? = null"

Language design

  • KT-14486 Allow smart cast in closure if a local variable is modified only before it (and not after or inside)
  • KT-15667 Support "::foo" as a short-hand syntax for bound callable reference to "this::foo"
  • KT-16681 kotlin allows mutating the field of read-only property

Libraries

  • KT-19258 Java 9: module-info.java with requires kotlin.stdlib causes compiler to fail: "module reads package from both kotlin.reflect and kotlin.stdlib"

Tools

  • KT-19692 kotlin-jpa plugin doesn't support @MappedSuperclass annotation
  • KT-20030 Parcelize can directly reference writeToParcel and CREATOR for final, non-Parcelize Parcelable types in same compilation unit.
  • KT-19742 [Android extensions] Calling clearFindViewByIdCache causes NPE
  • KT-19749 Android extensions + Parcelable: NoSuchMethodError on attempt to pack into parcel a serializable object
  • KT-20026 Parcelize overrides describeContents despite being already implemented.
  • KT-20027 Parcelize uses wrong classloader when reading parcelable type.
  • KT-20029 Parcelize should not directly reference parcel methods on types outside compilation unit
  • KT-20032 Parcelize does not respect type nullability in case of Parcelize parcelables

Tools. CLI

  • KT-10563 Support a command line argument -Werror to treat warnings as errors

Tools. Gradle

  • KT-20212 Cannot access internal components from test code

Tools. kapt

  • KT-17923 Reference to Dagger generated class is highlighted red
  • KT-18923 Kapt: Do not use the Kotlin error message collector to issue errors from kapt
  • KT-19097 Request: Decent support of kapt.kotlin.generated on Intellij/Android Studio
  • KT-20001 kapt generate stubs Gradle task does not depend on the compilation of sub-project kapt dependencies

1.1.51

29 Sep 11:23
Compare
Choose a tag to compare
  • KT-19901 KotlinLanguageInjector#getLanguagesToInject can cancel any progress in which it was invoked
  • KT-20411 JSR 305 meta-annotations support is broken with Kotlin 1.1.50

1.1.50

22 Sep 13:07
Compare
Choose a tag to compare

Android

  • KT-14800 Kotlin Lint: @SuppressLint annotation on local variable is ignored
  • KT-16600 False positive "For methods, permission annotation should specify one of value, anyOf or allOf"
  • KT-16834 Android Lint: Bogus warning on @SetParam:StringRes
  • KT-17785 Kotlin Lint: "Incorrect support annotation usage" does not pick the value of const val
  • KT-18837 Android Lint: Collection.removeIf is not flagged when used on RealmList
  • KT-18893 Android support annotations (ColorInt, etc) cannot be used on properties: "does not apply for type void"
  • KT-18997 KLint: False positive "Could not find property setter method setLevel on java.lang.Object" if using elvis with return on RHS
  • KT-19671 UAST: Parameter annotations not provided for val parameters

Compiler

Performance Improvements

  • KT-17963 Unnecessary boxing in case of primitive comparison to object
  • KT-18589 'Equality check can be used instead of elvis' produces code that causes boxing
  • KT-18693 Optimize in-expression with optimizable range in RHS
  • KT-18721 Improve code generation for if-in-primitive-literal expression ('if (expr in low .. high)')
  • KT-18818 Optimize null cases in when statement to avoid Intrinsics usage
  • KT-18834 Do not create ranges for 'x in low..high' where type of x doesn't match range element type
  • KT-19029 Use specialized equality implementations for 'when'
  • KT-19149 Use 'for-in-until' loop in intrinsic array constructors
  • KT-19252 Use 'for-in-until' loop for 'for-in-rangeTo' loops with constant upper bounds when possible
  • KT-19256 Destructuring assignment generates redundant code for temporary variable nullification
  • KT-19457 Extremely slow analysis for file with deeply nested lambdas

Fixes

  • KT-10754 Bogus unresolved extension function
  • KT-11739 Incorrect error message on getValue operator with KProperty parameter
  • KT-11834 INAPPLICABLE_LATEINIT_MODIFIER is confusing for a generic type parameter with nullable (default) upper bound
  • KT-11963 Exception: recursive call in a lazy value under LockBasedStorageManager
  • KT-12737 Confusing error message when calling extension function with an implicit receiver, passing value parameter of wrong type
  • KT-12767 Too much unnecessary information in "N type arguments expected" error message
  • KT-12796 IllegalArgumentException on referencing inner class constructor on an outer class instance
  • KT-12899 Platform null escapes if passed as an extension receiver to an inline function
  • KT-13665 Generic componentN() functions should provide better diagnostics when type cannot be inferred
  • KT-16223 Confusing diagnostic for local inline functions
  • KT-16246 CompilationException caused by intersection type overload and wrong type parameter
  • KT-16746 DslMarker doesn't work with typealiases
  • KT-17444 Accessors generated for private file functions should respect @JvmName
  • KT-17464 Calling super constructor with generic function call in arguments fails at runtime
  • KT-17725 java.lang.VerifyError when both dispatch receiver and extension receiver have smart casts
  • KT-17745 Unfriendly error message on creating an instance of interface via typealias
  • KT-17748 Equality for class literals of primitive types is not preserved by reification
  • KT-17879 Comparing T::class from a reified generic with a Class<> and KClass<> variable in when statement is broken
  • KT-18356 Argument reordering in super class constructor call for anonymous object fails with VerifyError
  • KT-18819 JVM BE treats 'if (a in low .. high)' as 'if (a >= low && a <= high)', so 'high' can be non-evaluated
  • KT-18855 Convert "Remove at from annotation argument" inspection into compiler error & quick-fix
  • KT-18858 Exception within typealias expansion with dynamic used as one of type arguments
  • KT-18902 NullPointerException when using provideDelegate with properties of the base class at runtime
  • KT-18940 REPEATED_ANNOTATION is reported on wrong location for typealias arguments
  • KT-18944 Type annotations are lost for dynamic type
  • KT-18966 Report full package FQ name in compilation errors related to visibility
  • KT-18971 Missing non-null assertion for platform type passed as a receiver to the member extension function
  • KT-18982 NoSuchFieldError on access to imported object property from the declaring object itself
  • KT-18985 Too large highlighting range for UNCHECKED_CAST
  • KT-19058 VerifyError: no CHECKAST on dispatch receiver of the synthetic property defined in Java interface
  • KT-19100 VerifyError: missing CHECKCAST on extension receiver of the extension property
  • KT-19115 Report warnings on usages of JSR 305-annotated declarations which rely on incorrect or missing nullability information
  • KT-19128 java.lang.VerifyError with smart cast to String from Any
  • KT-19180 Bad SAM conversion of Java interface causing ClassCastException: [...] cannot be cast to kotlin.jvm.functions.Function1
  • KT-19205 Poor diagnostic message for deprecated class referenced through typealias
  • KT-19367 NSFE if property with name matching companion object property name is referenced within lambda
  • KT-19434 Object inheriting generic class with a reified type parameter looses method annotations
  • KT-19475 AnalyserException in case of combination of while (true) + stack-spilling (coroutines/try-catch expressions)
  • KT-19528 Compiler exception on inline suspend function inside a generic class
  • KT-19575 Deprecated typealias is not marked as such in access to companion object
  • KT-19601 UPPER_BOUND_VIOLATED reported on type alias expansion in a recursive upper bound on a type parameter
  • KT-19814 Runtime annotations for open suspend function are not generated correctly
  • KT-19892 Overriding remove method on inheritance from TreeSet
  • KT-19910 Nullability assertions removed when inlining an anonymous object in crossinline lambda
  • KT-19985 JSR 305: nullability qualifier of Java function return type detected incorrectly in case of using annotation nickname

IDE

New Features

  • KT-6676 Show enum constant ordinal in quick doc like in Java
  • KT-12246 Kotlin source files are not highlighted in Gradle build output in IntelliJ

Performance Improvements

  • KT-19670 When computing argument hints, don't resolve call if none of the arguments are unclear expressions

Fixes

Read more

1.1.4-3

30 Aug 08:58
Compare
Choose a tag to compare
  • KT-18062 SamWithReceiver compiler plugin not used by IntelliJ for .kt files
  • KT-18497 Gradle Kotlin Plugin does not work with the gradle java-library plugin
  • KT-19276 Console spam when opening idea-community project in debug IDEA
  • KT-19433 [Coroutines + Kapt3] Assertion failed in ClassClsStubBuilder.createNestedClassStub
  • KT-19680 kapt3 & Parcelize: Compilation error
  • KT-19687 Kotlin 1.1.4 noarg plugin breaks with sealed classes
  • KT-19700 Kapt error after updating to 1.1.4 - stub adds type parameters where there are none
  • KT-19713 Mocking of final named suspend methods with mockito fails
  • KT-19729 kapt3: not always including argument to @javax.inject.Named in generated stubs
  • KT-19759 "Convert to expression body" is not shown in 162 / AS23 branches for multi-liners
  • KT-19767 NPE caused by Map<String, Boolean>?.get
  • KT-19769 PerModulePackageCacheService calls getOrderEntriesForFile() for every file, even those that can't affect Kotlin resolve
  • KT-19774 Provide an opt-out flag for separate classes directories (Gradle 4.0+)
  • KT-19847 if an imported library already exists it should be redetected during gradle import

1.1.4-2

18 Aug 15:06
Compare
Choose a tag to compare
  • KT-19679 CompilationException: Couldn't inline method call 'methodName' into...
  • KT-19690 Lazy field in interface default method leads to ClassFormatError
  • KT-19716 Quickdoc Ctrl+Q broken while browsing code completion list Ctrl-Space
  • KT-19717 Library kind incorrectly detected for vertx-web in Kotlin project
  • KT-19723 "Insufficient maximum stack size" during compilation