Skip to content

Releases: JetBrains/kotlin

Kotlin 1.5.10

24 May 10:38

Choose a tag to compare

How to update to a new release

Changelog

Compiler

Fixes

  • KT-41078 Incorrect type substitution in contracts with type parameters
  • KT-44770 JVM / IR: "IllegalArgumentException: Unrecognized Type: [null]" Jackson doesn't recognize type
  • KT-45084 JVM IR: "NoSuchElementException: Sequence contains no element matching the predicate" when inline class is passed to lambda with >22 parameters
  • KT-45779 JVM / IR: java.lang.NoSuchMethodError: 'int java.lang.Integer.plus(int)' caused by function reference
  • KT-45941 JVM IR: local functions use generic type parameters of the outer class in the bytecode, which breaks Bytebuddy and MockK
  • KT-46149 Generate synthetic classes for SAM adapters with erased instead of generic supertype
  • KT-46189 JVM IR: tailrec function with capturing lambda in default parameter value leads to NoSuchMethodError at runtime
  • KT-46214 JVM / IR: "IllegalStateException: No mapping for symbol: VALUE_PARAMETER INSTANCE_RECEIVER" on a suspend function in an inner class
  • KT-46238 JVM IR: BootstrapMethodError in JDK 11+ on intersection type passed in arguments of SAM adapter where SAM interface's type parameter has a non-trivial upper bound
  • KT-46259 JVM IR: local function for adapted function reference is not declared as ACC_SYNTHETIC
  • KT-46284 JVM IR: "Unbound private symbol IrClassSymbol" on class reference to script class
  • KT-46402 IllegalAccessError: "CapturedLambdaInterpreter (in unnamed module @0x71b06418) cannot access class jdk.internal.org.objectweb.asm.Type" caused by inline function with a suspend parameter in Maven project
  • KT-46408 JVM IR: BootstrapMethodError due to missing bridge for subclass of generic Java interface
  • KT-46426 JVM IR: Corrupted .class file when passing Array constructor reference as (inline) lambda
  • KT-46455 OOM on parsing invalid code with string interpolation
  • KT-46503 JVM IR: "AssertionError: Unexpected variance in super type argument: out @1"
  • KT-46505 JVM IR: NullPointerException caused by a callable reference with nullable inline value class parameter
  • KT-46512 JVM / IR: NoSuchMethodError on SAM conversion of a function reference
  • KT-46515 IndexOutOfBoundsException: "Empty list doesn't contain element at index 0." on bad variable name in 1.5.0
  • KT-46516 JVM IR: "AnalyzerException: Expected I, but found R" on subclassing AbstractMutableList
  • KT-46524 Cannot use unsigned literals with api-version < 1.5 even with opt-in
  • KT-46537 JVM / IR: "IllegalStateException: No noarg super constructor for CLASS" caused by "No-arg" plugin with annotation on child class
  • KT-46540 JVM / IR: AnalyzerException: Expected an object reference, but found J caused by java.function.Supplier
  • KT-46554 JVM IR: "IllegalStateException: No mapping for symbol: VAR IR_TEMPORARY_VARIABLE" with value class constructor delegation call
  • KT-46555 JVM IR: IllegalAccessError when using Java method reference
  • KT-46562 Kotlin 1.5.0 generates non-serializable lambdas when they should be serializable
  • KT-46568 JVM IR: "AssertionError: IrCall expected inside JvmStatic wrapper" on compiling protected static function with return type Nothing inside companion object of abstract class
  • KT-46574 JVM / IR: ClassCastException caused by runBlocking awaiting call while returning Kotlin.Result type.
  • KT-46579 JVM IR: "IllegalArgumentException: Sequence contains more than one matching element" for Java enum with overloaded values() static method
  • KT-46584 JVM IR: Intrinsics.needClassReification (UnsupportedOperationException thrown). Property delegate provider crossinline lambda inlining/reification issue
  • KT-46751 JVM / IR:"ClassCastException: java.lang.String cannot be cast to java.lang.Void" in extension function in Kotlin 1.5

IDE

  • KT-45981 failed to analyze: java.lang.AssertionError: diagnostic callback has been already registered: Code analysis get stuck in AS 2020.3.1.14 & Kotlin v1.5.0-M2
  • KT-46622 60+ second freezes with Kotlin plugin 1.5.0: GetModuleInfoKt.findJvmStdlibAcrossDependencies

IDE. Gradle Integration

  • KT-46417 [UNRESOLVED_REFERENCE] For project to project dependencies of native platform test source sets

Libraries

  • KT-46280 JvmRecord annotation missing constructor in common

Middle-end. IR

  • KT-44013 NPE: When calling constructor of a function type while inheriting from it, despite it's an interface

Tools. Android Extensions

  • KT-46590 Kotlin Android Extensions 1.5.0 generates bad writeToParcel() method for nullable Array types

Tools. Gradle

  • KT-41142 Kotlin version conflict when using Kotlin Gradle plugins in pre-compiled script plugin
  • KT-46353 Optimizations disabled in Gradle 7 for KAPT when generating sources
  • KT-46368 Memory leak with 1.5.0-RC when building with Gradle
  • KT-46689 Track -Xuse-old-backend flag usage

Tools. Gradle. JS

  • KT-46006 KJS \ Gradle: Task without declaring an explicit or implicit dependency on jsGenerateExternalsIntegrated in Gradle 7
  • KT-46162 KJS: Exported items unavailable on dev server
  • KT-46331 KJS: With kotlin.js.webpack.major.version=4 browserXRun tasks fail

Tools. Parcelize

  • KT-46567 Kotlin 1.5.0 parcelize compilation fails in new backend when using TypeParceller with nested generics

Tools. kapt

  • KT-45532 Do not create Kapt stubs directory during configuration time

Checksums

File Sha256
kotlin-compiler-1.5.10.zip 2f8de1d73b816354055ff6a4b974b711c11ad55a68b948ed30b38155706b3c4e
kotlin-native-linux-1.5.10.tar.gz 0463222fb84e0f997e3c71af89ed1d1c4b3b9894cafffe5fc0ba1f125cf362ea
kotlin-native-macos-1.5.10.tar.gz bc227baad4a4c8b5cdf0b1a08fa3fb59132043f2ea88e2343c5f25584f5de3cd
kotlin-native-windows-1.5.10.zip e0816d91da9c4c38b3ef8891033185cb183f4a901054c9f17a9c72295ed40324

Kotlin 1.5.0

05 May 07:39

Choose a tag to compare

Changelog

Backend. Native

  • KT-42053 Support compiler caches for linux_x64
  • KT-43690 Support compiler caches for ios_arm64

Backend. IR

  • KT-42684 StackOverflowError on recursive inline arguments in inline fun

Compiler

New Features

  • KT-28791 Kotlin serialization with inline classes
  • KT-30222 Support JVM target version selection in Kotlin bytecode tool window
  • KT-41884 Support 'file' target for JvmSynthetic annotation
  • KT-43677 Support for Java records
  • KT-43920 Support loading binary Java annotations on fields
  • KT-44278 Generate SAM-converted lambdas and function references using 'invokedynamic' on JDK 1.8+
  • KT-44650 Deprecate JVM target version 1.6
  • KT-44787 Suspend functions in fun interfaces
  • KT-44865 Allow to declare protected constructors in sealed classes
  • KT-44869 Compiling sealed interface with version less than 1.5: error message from future could be provided

Performance Improvements

  • KT-6336 Optimize generation of local functions
  • KT-7307 Optimize infix call of String.plus
  • KT-18692 Optimize '<optimizable_range> step x' for-in loop
  • KT-19978 Inefficient bytecode generated for function references undergoing Java SAM conversion
  • KT-23565 OperationsMapGenerated.kt generates unreasonable amount of bytecode
  • KT-23825 Tail suspend call utilizing elvis operator does not take advantage of suspend tail call optimization
  • KT-23826 A suspend function on the right side of a returned || condition is not tail call optimized
  • KT-25348 No compile time unsigned integer conversion when using hex literal
  • KT-26060 Support a compiler mode to compile lambda expressions using invokedynamic instruction
  • KT-26590 Do not generate create method for suspend lambdas if its arity >= 2
  • KT-27427 Optimize nullable check introduced with 'as' cast
  • KT-28246 Redundant boxing/unboxing isn't eliminated by the compiler in case of inline classes and javaClass intrinsic
  • KT-30605 Constant folding doesn't evaluate inv() function
  • KT-36845 Generate enum-based TABLESWITCH/LOOKUPSWITCH on a value with smart cast to enum in JVM_IR
  • KT-39585 JVM BE generates redundant accessor calls when accessing static final field lifted from companion
  • KT-40886 Old JVM BE unspills ACONST_NULL from continuation
  • KT-42621 Kotlin binary size considerably larger for code extensively using stream API
  • KT-44153 NI: Low Memory and IntelliJ hangs when quotes in split() are missed
  • KT-45410 JVM / IR: Extreme performance regression on arithmetic operations inside a loop

Fixes

  • KT-6007 Support changed return type of inlined generic function when lambda returns anonymous object
  • KT-6055 Failed invoke plus assign on array element accessed via several args through local get/set convention extensions
  • KT-6879 CompilationException when local classes hierarchy is placed within other local or inner declaration
  • KT-8120 NoSuchMethodError on local class constructor call inside a local class
  • KT-8199 "Cannot pop operand off an empty stack" for local class using a captured variable as default value for constructor parameter
  • KT-10835 "AssertionError: Non-outer parameter incorrectly mapped to outer" when inlining object literal extending inner class
  • KT-12790 Don't generate synthetic accessors for private inline function/properties
  • KT-13213 IllegalArgumentException in ByteVector.putUTF8 on attempt to compile file with moderately long string literal
  • KT-14628 "UnsupportedOperationException: Don't know how to generate outer expression" for nested class inheriting from inner class with a companion object
  • KT-14833 JVM internal error: Augment assignment and increment are not supported for local delegated properties and inline properties
  • KT-15403 Suspend operator get wrong code generated by BE (NoSuchMethodError)
  • KT-15404 Suspend operator set wrong code generated
  • KT-16084 Proguard can't find enclosing class of let closure inside apply closure
  • KT-16151 Internal compiler error when using plusAssign operator with mutable map
  • KT-16221 Support in/!in suspend operators
  • KT-16282 "Cannot pop operand off an empty stack" for plusAssign with default parameters in setter operator
  • KT-16445 java.lang.VerifyError: Bad type on operand stack when delegating an interface through a private reified function inside an object
  • KT-16520 Invalid bytecode semantics for set call by convention with default parameters
  • KT-16567 Inliner creates redundant objects on source inlining
  • KT-16752 Delegating function interface to function reference does not work
  • KT-17554 Incorrect cast to Unit generated on annotated when-expression with a single-branch if inside
  • KT-17738 Java cannot extend class implementing kotlin.collections.Map
  • KT-17753 Strange behavior of if and return statements
  • KT-18583 "ISE: Recursive call in a lazy value" for generic sealed class with nested subclass in a when(this) with inferred return type
  • KT-19861 "IllegalStateException: Label wasn't found during iterating through instructions" for plusAssign with safe call
  • KT-20306 Make 'when' over an 'expect' enum class non-exhaustive
  • KT-20869 kotlin.jvm.internal.DefaultConstructorMarker should be public
  • KT-20996 IllegalStateException: Cannot get FQ name of local class: class in metadata serialization for common code
  • KT-21014 Incorrect bytecode generated for 'PrimitiveArray::size'
  • KT-21092 Reference javaClass for generic property: "couldn't transform method node: get()"
  • KT-21778 "IllegalStateException: Couldn't build context" for inline function inside an anonymous object
  • KT-21900 VerifyError on equals on generic primitive type
  • KT-22098 "UnsupportedOperationException: Don't know how to generate outer expression" on extension function call inside lambda in anonymous object super constructor call
  • KT-22488 Bad line numbers generated for '&&' expression
  • KT-22972 A compiler bug(?) in Number class descendants
  • KT-23619 Transform stateless singleton lambda during inline
  • KT-23881 Declaration of lambda in inlined apply block holds reference to superfluous references causing leak
  • KT-24135 Calling invoke on crossinline suspend lambda leads to no state-machine
  • KT-24193 NoClassDefFoundError: java/lang/Cloneable$DefaultImpls on inheritance from Cloneable through an interfac...
Read more

Kotlin 1.5.0-RC

14 Apr 17:11

Choose a tag to compare

Kotlin 1.5.0-RC Pre-release
Pre-release

Changelog

Compiler

New Features

  • KT-28791 Kotlin serialization with inline classes
  • KT-43920 Support loading binary Java annotations on fields

Performance Improvements

  • KT-44153 NI: Low Memory and IntelliJ hangs when quotes in split() are missed
  • KT-45410 JVM / IR: Extreme performance regression on arithmetic operations inside a loop

Fixes

  • KT-35224 It's possible to pass non-spread arrays after arguments with SAM-conversion
  • KT-36853 IR: UninitializedPropertyAccessException on tailrec with object expression in default argument
  • KT-41056 Increase stub version due to new "contract" keyword
  • KT-43887 Problem with FunctionReferenceLowering$FunctionReferenceBuilder in kotlin native
  • KT-44210 KJS / IR: "AssertionError: Undefined parameter referenced: defined" caused by plus assign operators in build blocks
  • KT-44947 Sealed interfaces: Sealed fun interface leads to "NoWhenBranchMatchedException"
  • KT-44993 JVM IR: VerifyError on getfield with Kotlin generic field and elvis operator
  • KT-45139 Inline class: AssertionError: Expected top level inline class
  • KT-45195 JVM IR: annotation methods are generated as default interface methods if allopen is used
  • KT-45446 JVM / IR: NullPointerException caused by unreachable code and comparison
  • KT-45721 JVM / IR: "Unbound symbols not allowed" caused by class reference in sequence lambda
  • KT-45853 JVM / IR: "Accidental override" caused by inheriting Throwable.getCause from Java interface
  • KT-45861 Turning warnings into errors for calls with type parameters annotated by @OnlyInputTypes
  • KT-45868 JVM IR: ClassCastException with SAM function in init block when SAM is generated via invokedynamic
  • KT-45920 JVM IR: "Accidental override" on redefining get() in custom Map class
  • KT-45963 JVM / IR: "AbstractMethodError: Receiver class does not define or inherit an implementation of the resolved method" in Dokka tests
  • KT-45967 JVM IR: "IllegalAccessError" with invokedynamic to Java SAM over callable reference to private function
  • KT-45982 Wrong subtyping result on captured types with postponed type variables

IDE. Inspections and Intentions

  • KT-38155 Lift assignment out of 'if' produces type mismatch without manually adding a semicolon

JavaScript

  • KT-44796 KJS / IR: default parameter of function with @JsName leads to "RangeError: Maximum call stack size exceeded"

Libraries

  • KT-39177 Make CharCategory available in common multiplatform code
  • KT-43772 Kotlin/Native unfinished workers detected.

Tools. Gradle

  • KT-43605 Kotlin Gradle Plugin 1.4.20 undeclared system property reads cause problems with Gradle configuration cache enabled
  • KT-44462 Kotlin Gradle plugin creates compile configuration with Gradle 7.0
  • KT-44949 Compatibility with Gradle 7.0
  • KT-44957 gradle - target.compilations seems to be deprecated
  • KT-45340 Update minimal supported version of Kotlin Gradle Plugin to 6.1

Tools. Gradle. Multiplatform

  • KT-44900 Support gradle configuration cache with kotlin.multiplatform plugin

Tools. kapt

  • KT-43686 KaptWithoutKotlincTask should use @CompileClasspath for kotlinStdlibClasspath for cache relocateability.
  • KT-44130 KAPT changes field order in 1.4.30-M1

Checksums

File Sha256
kotlin-compiler-1.5.0-RC.zip 91a82ea9ff1b49ef1c342d52b3fe54fed92aa79201ee0d452fe9b72e698ea98b
kotlin-native-linux-1.5.0-RC.tar.gz 6336cf1d360bd62adfffb4442a31e06150721cc767c76eca2830e9e45eed9bbc
kotlin-native-macos-1.5.0-RC.tar.gz 2d868b738b77ca290ea4c714669e31ed29f3befbb71aa0d0b4b0ad1ebddf1a9d
kotlin-native-windows-1.5.0-RC.zip dd3c6bec6aa1b50e1764484406d450d4ae491169a47add5e2174e82de73e567d

Kotlin 1.5.0-M2

29 Mar 12:19

Choose a tag to compare

Kotlin 1.5.0-M2 Pre-release
Pre-release

Changelog

Compiler

New Features

  • KT-30222 Support JVM target version selection in Kotlin bytecode tool window
  • KT-41884 Support 'file' target for JvmSynthetic annotation
  • KT-44278 Generate SAM-converted lambdas and function references using 'invokedynamic' on JDK 1.8+

Performance Improvements

  • KT-26060 Support a compiler mode to compile lambda expressions using invokedynamic instruction
  • KT-42621 Kotlin binary size considerably larger for code extensively using stream API

Fixes

  • KT-20306 Make 'when' over an 'expect' enum class non-exhaustive
  • KT-20869 kotlin.jvm.internal.DefaultConstructorMarker should be public
  • KT-26592 Do not generate private suspend functions as synthetic package-private
  • KT-38100 Support local delegated properties (not inlined) in new JVM default modes
  • KT-40392 Deprecate JvmDefault annotation and old -Xjvm-default modes
  • KT-41758 Deprecate kotlin.Metadata.bytecodeVersion and avoid using it in the compiler
  • KT-42092 JVM / IR: "AnalyzerException: Argument 1: expected R, but found J" when trying to add to ArrayList the result of a function applied to int
  • KT-42321 JVM IR: do not cast integer value based on the type of a literal receiver of an operator call
  • KT-42404 "Supertypes of the following classes cannot be resolved" in Rider project
  • KT-42472 No TYPE_INFERENCE_UPPER_BOUND_VIOLATED for Delegated Properties do not check types (in Kotlin 1.4.10)
  • KT-43167 JVM IR, serialization: "No mapping for symbol: VALUE_PARAMETER INSTANCE_RECEIVER" with data class containing property defined in body
  • KT-43303 NI: False negative TYPE_INFERENCE_UPPER_BOUND_VIOLATED when inferred type argument is not a subtype of type parameter upper bound
  • KT-44368 "IllegalStateException: Error type encountered" when inlining 'invoke' operator without enough information on type variable
  • KT-44412 JVM IR backend fails to compile break in condition of do while
  • KT-44471 Fix failing script tests after switching to 1.5
  • KT-44474 Compiler expects sealed type inheritors from platform specific source-sets in when expression in common source-set
  • KT-44483 JVM IR: CCE on calling generic vararg function reference with Array expected type
  • KT-44550 KotlinBinaryClassCache leaks Kotlin plugin classloader on plugin unload
  • KT-44546 NI: changed variable fixation order (that can lead to changed resolution)
  • KT-44583 "Supertypes of the following classes cannot be resolved" error message gives no context
  • KT-44627 JVM IR: ACCIDENTAL_OVERRIDE when overriding a generic field where the type parameter has a primitive bound
  • KT-44703 JVM / IR: "IllegalStateException: Unhandled special name in mangledNameFor" caused by a reference to inline class inside interface's companion with lazy initialization
  • KT-44714 Debugger / Coroutines: Local variables are trimmed out too aggressively
  • KT-44722 JVM IR: ClassCastException with inline class, let and bound function reference
  • KT-44726 JVM IR: Incorrect KType nullability for platform type reified as non-null
  • KT-44798 JVM IR: Inherited platform declarations clash for class implementing both List and Set
  • KT-44801 1.4.30 JVM IR: Unbound symbols not allowed with anonymous object
  • KT-44803 FIR bootstrap: incorrect nullability is set for type alias-based type
  • KT-44827 Non-existing outer class is written in anonymous class for SAM wrapper in inline lambda with capture
  • KT-44878 JVM_IR: "IllegalStateException: Unexpected types" when checking non-nullable variable is in range between nullable ones with smart-cast
  • KT-44926 MPP: Actual typealias to compiled inline class incompatible with expect inline class
  • KT-44974 LambdaConversionException in case of SAM-converted captuing extension lambda
  • KT-45008 JVM IR: hashCode is generated as invokeinterface if smart cast to interface is present
  • KT-45011 JVM / IR: "AssertionError: Unbound symbols not allowed"
  • KT-45022 IR: "AssertionError: Undefined variable referenced" from psi2ir caused by plusAssign operator of object
  • KT-45064 JVM IR: "java.lang.AssertionError: SyntheticAccessorLowering should not attempt to modify other files!" with member reference to property in another file with private setter
  • KT-45069 JVM / IR: New SAM conversions mode fails when converting from Unit to Any
  • KT-45131 JVM / IR: "RuntimeException: Lambda, SAM or anonymous object should have only one constructor" caused by inline class that type cast to reified type parameter inside lambda in inline function
  • KT-45243 "IllegalStateException: Lambdas shouldn't be visited by ESExpressionVisitor" caused by lambda inside kotlin.test.assertNotNull
  • KT-45259 JVM: ClassCastException caused by Result as lambda parameter type
  • KT-45292 AssertionError with recursive inline extension property
  • KT-45300 Deprecate super calls in public-api inline functions
  • KT-45409 Rename jspecify annotations’ package and default not null annotation

IDE

  • KT-44487 MPP, IDE: No error in IDE when sealed class inheritor from common source-set is not used in exhaustive when expression in platform source-set
  • KT-45254 Highlighting for files with certain errors appears only on second opening

IDE. Decompiler, Indexing, Stubs

  • KT-43699 IDE: Unresolved extension method from Java code for simple class with typealias and generics (IllegalStateException: Unknown type parameter)
  • KT-44756 Infinite "UpToDateStubIndexMismatch: PSI and index do not match." with IDEA 2021.1 EAP upon attempt to open "org.gradle.configurationcache" even they seem to be the same

IDE. Gradle Integration

  • KT-37127 Implement precise importing of platforms of root source sets (commonMain/commonTest) when hierarchical multiplatform support is enabled

IDE. Misc

  • KT-44675 Incorrect reference to resource into 202 plugin

IDE. Refactorings

  • KT-44839 Sealed interfaces: move refactoring warnings works with "more freedom for sealed classes" rules for language level < 1.5

IDE. Script

  • KT-43288 Allow push notifications about script configuration /dependencies changes via the ScriptDefinitionsProvider EP

JavaScript

  • KT-39272 KJS / IR: Can't use javascript keywords as JsName
  • KT-41650 JS IR BE: default should be a reserved identifier
  • KT-44433 KJS IR: support function interfaces with suspend member
  • KT-45059 KJS / IR: Add possibility for runtime diagnostics of DCE result

Libraries

Read more

Kotlin 1.4.32

30 Mar 05:53
9e50a23

Choose a tag to compare

Changelog

IDE

  • KT-43824 KtLightClassForSourceDeclaration#isInheritor works in a different way than java implementation
  • KT-45287 LightClasses: KtLightSimpleModifierList is no more a parent of KtLightAnnotationForSourceEntry
  • KT-45291 LightClasses: can't get annotations for constructor val-parameter
  • KT-45417 ULC leakage of primitive type annotations

Tools. CLI

  • KT-44758 kotlin-compiler-embeddable dependency includes unshaded fastutil package
  • KT-45007 Concurrent Kotlin script compilation/execution results in NullPointerException in KeyedExtensionCollector.getPoint()

Checksums

File Sha256
kotlin-compiler-1.4.32.zip dfef23bb86bd5f36166d4ec1267c8de53b3827c446d54e82322c6b6daad3594c
kotlin-native-linux-1.4.32.tar.gz 3712fab4c60484fd8b5538dd018a0023033cb3ea38d2a3023c79b342e4e8b24d
kotlin-native-macos-1.4.32.tar.gz a55eb3c60bb9810360c5a992dca34328d806fe13f3bfc3120b49345f569fd3cc
kotlin-native-windows-1.4.32.zip 3bd6f1b9293897a45d0b33ee14ca51b33b57d0413b774458c6e4aee393e1b772

Kotlin 1.5.0-M1

03 Mar 14:29

Choose a tag to compare

Kotlin 1.5.0-M1 Pre-release
Pre-release

You could find information about EAP program and setup instructions here

Changelog

Backend. Native

  • KT-42053 Support compiler caches for linux_x64
  • KT-43690 Support compiler caches for ios_arm64

Compiler

New Features

  • KT-42522 Enable string concatenation via invokedynamic by default for JVM target 9 and above
  • KT-43677 Support for Java records
  • KT-44650 Deprecate JVM target version 1.6
  • KT-44787 Suspend functions in fun interfaces
  • KT-44865 Allow to declare protected constructors in sealed classes
  • KT-44869 Compiling sealed interface with version less than 1.5: error message from future could be provided

Performance Improvements

  • KT-6336 Optimize generation of local functions
  • KT-7307 Optimize infix call of String.plus
  • KT-18692 Optimize '<optimizable_range> step x' for-in loop
  • KT-19978 Inefficient bytecode generated for function references undergoing Java SAM conversion
  • KT-23565 OperationsMapGenerated.kt generates unreasonable amount of bytecode
  • KT-23825 Tail suspend call utilizing elvis operator does not take advantage of suspend tail call optimization
  • KT-23826 A suspend function on the right side of a returned || condition is not tail call optimized
  • KT-25348 No compile time unsigned integer conversion when using hex literal
  • KT-26590 Do not generate create method for suspend lambdas if its arity >= 2
  • KT-27427 Optimize nullable check introduced with 'as' cast
  • KT-28246 Redundant boxing/unboxing isn't eliminated by the compiler in case of inline classes and javaClass intrinsic
  • KT-30605 Constant folding doesn't evaluate inv() function
  • KT-36845 Generate enum-based TABLESWITCH/LOOKUPSWITCH on a value with smart cast to enum in JVM_IR
  • KT-39585 JVM BE generates redundant accessor calls when accessing static final field lifted from companion
  • KT-40886 Old JVM BE unspills ACONST_NULL from continuation

Fixes

  • KT-6007 Support changed return type of inlined generic function when lambda returns anonymous object
  • KT-6055 Failed invoke plus assign on array element accessed via several args through local get/set convention extensions
  • KT-6879 CompilationException when local classes hierarchy is placed within other local or inner declaration
  • KT-8120 NoSuchMethodError on local class constructor call inside a local class
  • KT-8199 "Cannot pop operand off an empty stack" for local class using a captured variable as default value for constructor parameter
  • KT-10835 "AssertionError: Non-outer parameter incorrectly mapped to outer" when inlining object literal extending inner class
  • KT-12790 Don't generate synthetic accessors for private inline function/properties
  • KT-13213 IllegalArgumentException in ByteVector.putUTF8 on attempt to compile file with moderately long string literal
  • KT-14628 "UnsupportedOperationException: Don't know how to generate outer expression" for nested class inheriting from inner class with a companion object
  • KT-14833 JVM internal error: Augment assignment and increment are not supported for local delegated properties and inline properties
  • KT-15403 Suspend operator get wrong code generated by BE (NoSuchMethodError)
  • KT-15404 Suspend operator set wrong code generated
  • KT-16084 Proguard can't find enclosing class of let closure inside apply closure
  • KT-16151 Internal compiler error when using plusAssign operator with mutable map
  • KT-16221 Support in/!in suspend operators
  • KT-16282 "Cannot pop operand off an empty stack" for plusAssign with default parameters in setter operator
  • KT-16445 java.lang.VerifyError: Bad type on operand stack when delegating an interface through a private reified function inside an object
  • KT-16520 Invalid bytecode semantics for set call by convention with default parameters
  • KT-16567 Inliner creates redundant objects on source inlining
  • KT-16752 Delegating function interface to function reference does not work
  • KT-17554 Incorrect cast to Unit generated on annotated when-expression with a single-branch if inside
  • KT-17738 Java cannot extend class implementing kotlin.collections.Map
  • KT-17753 Strange behavior of if and return statements
  • KT-18583 "ISE: Recursive call in a lazy value" for generic sealed class with nested subclass in a when(this) with inferred return type
  • KT-19861 "IllegalStateException: Label wasn't found during iterating through instructions" for plusAssign with safe call
  • KT-20996 IllegalStateException: Cannot get FQ name of local class: class in metadata serialization for common code
  • KT-21014 Incorrect bytecode generated for 'PrimitiveArray::size'
  • KT-21092 Reference javaClass for generic property: "couldn't transform method node: get()"
  • KT-21778 "IllegalStateException: Couldn't build context" for inline function inside an anonymous object
  • KT-21900 VerifyError on equals on generic primitive type
  • KT-22098 "UnsupportedOperationException: Don't know how to generate outer expression" on extension function call inside lambda in anonymous object super constructor call
  • KT-22488 Bad line numbers generated for '&&' expression
  • KT-22972 A compiler bug(?) in Number class descendants
  • KT-23619 Transform stateless singleton lambda during inline
  • KT-23881 Declaration of lambda in inlined apply block holds reference to superfluous references causing leak
  • KT-24135 Calling invoke on crossinline suspend lambda leads to no state-machine
  • KT-24193 NoClassDefFoundError: java/lang/Cloneable$DefaultImpls on inheritance from Cloneable through an interface
  • KT-24305 ClassNotFoundException when using Java reflection on local class in an inlined lambda
  • KT-24564 Custom operator fun set on ByteArray resolves properly but is miscompiled
  • KT-25400 "NoClassDefFoundError: kotlin/KotlinPackage" with Turkish system locale on macOS
  • KT-26130 Incorrect method signature for a generic function with inline class as a type parameter upper bound
  • KT-26360 "Method from super interface has a different signature" for Interface that extends both interfaces with and without @JvmDefault
  • KT-26473 Error on compiling inline class with calls of super methods equals(), hashCode(), toString()
  • KT-26474 VE “Bad type on operand stack” at runtime on calling toString() method of inline class with calls of super methods (toString(), equals(), hashCode()) inside
  • KT-27449 NoSuchMethodError for local suspend function with suspend lambda parameter with default value
    ...
Read more

Kotlin 1.4.31

26 Feb 08:48

Choose a tag to compare

1.4.31

Compiler

  • KT-39776 2020.3+: Unresolved reference to Kotlin stdlib function

IDE. Gradle Integration

  • KT-44845 After update to Kotlin 1.4.30 all external dependencies is unresolved in IDE with kotlin.mpp.enableGranularSourceSetsMetadata=true

IDE. Gradle. Script

  • KTIJ-11137 build.gradle.kts: Fatal error during save/load standalone scripts settings
  • KTIJ-898 Unable to import with Kotlin DSL buildscript - NullPointerException in KotlinDslScriptModelProcessorKt.toListOfScriptModels

IDE. Multiplatform

  • KTIJ-1200 KotlinIconProviderKt.addExpectActualMarker takes up to 180+ seconds

IDE

Fixes

  • KT-44697 New JVM IR backend notification - narrow its triggering to Kotlin projects
  • KT-44523 IDE notification for trying new JVM backend
  • KTIJ-696 Freeze during startup of IDEA with intellij project with Kotlin (211-1.4.10-release-IJ1440)

Checksums

File Sha256
kotlin-compiler-1.4.31.zip b50e7016febf7510325d685ae69cc62f49a7ca7f670cb4e0888112e3ec09c6ec *
kotlin-native-linux-1.4.31.tar.gz 87fc40385ffbd44eebde6487d15e1c5c67c218870b332b525e122f014b7de3e3
kotlin-native-macos-1.4.31.tar.gz 0e351756b382096204d61456f855480ce6b65ac53897c4bfa78a287895f37e32
kotlin-native-windows-1.4.31.zip a60aec97fd21294ab11e57acdd33d37d79db11b22656fa435b791e9a709727b4

* Sorry, Sha256 sum was initially published incorrectly. Now it is fixed.

Kotlin 1.4.30

03 Feb 15:24

Choose a tag to compare

CHANGELOG

Android

  • KT-42383 HMPP: Bad IDEA dependencies: Missing dependency from p1:jvmAndAndroid to p2:jvmAndAndroid

Backend. Native

  • KT-38772 Native: support non-reified type parameters in typeOf
  • KT-42234 Move LLVM optimization parameters into konan.properties
  • KT-42649 IndexOutOfBoundsException during InlineClassTransformer lowering
  • KT-42942 Native: optimize peak backend memory by clearing BindingContext after psi2ir
  • KT-43198 Native: support init blocks inside inline classes

Compiler

New Features

  • KT-28055 Support init blocks inside inline classes
  • KT-28056 Consider supporting non-public primary constructors for inline classes
  • KT-41265 Support noarg compiler plugin for JVM IR
  • KT-42094 Allow open callable members in expect interfaces
  • KT-43129 FIR: Support OverloadResolutionByLambdaReturnType
  • KT-43592 Promote JVM IR compiler backend to Beta
  • KT-43919 Support loading Java annotations on base classes and implementing interfaces' type arguments
  • KT-44021 Enable JVM IR backend by default in 1.5

Performance Improvements

  • KT-41352 JVM IR: reduce bytecode size in for loops and range checks with 'until' by not using inclusive end
  • KT-41644 NI: Infinite compilation
  • KT-42791 OutOfMemoryError on compilation using kotlin 1.4 on a class with a lot of type inference
  • KT-42920 NI: Improve performance around adding constraints

Fixes

  • KT-11454 Load annotations on TYPE_USE/TYPE_PARAMETER positions from Java class-files
  • KT-11732 Verify error for generic interface method invocation with default parameters
  • KT-14612 "ISE: Recursive call in a lazy value" during processing of a (weakly) recursive type alias
  • KT-18344 Upper bound of a typealias type parameter is not reported correctly if it contains the typealias itself
  • KT-18768 @NotNull annotation from Java does not work with varargs
  • KT-20548 java.lang.IllegalStateException: Illegal class container on simple Java code parsing
  • KT-22465 Excessive synthetic method for private setter from superclass
  • KT-23816 Inline classes: constants and annotations
  • KT-24158 AE: No receiver found on incomplete code with $-signs
  • KT-24392 Nullability of Java arrays is read incorrectly if @nullable annotation has both targets TYPE_USE and VALUE_PARAMETER
  • KT-26229 Lambda/anonymous function argument in parentheses is not supported for callsInPlace effect
  • KT-29735 KNPE at KtEnumEntrySuperclassReferenceExpression.getReferencedElement with explicit type argument inside enum member constructor
  • KT-31389 ClassFormatError with companion object in annotation with @JvmStatic
  • KT-31907 ISE: UNIT_EXPECTED_TYPE on parsing array literal inside lambda with Unit return type
  • KT-32228 Inconsistent boxing/unboxing for inline classes when interface is specialized by object expression
  • KT-32450 Inline class incorrectly gets re-wrapped when provided to a function
  • KT-35849 Missing nullability assertion on lambda return value if expected type has generic return value type
  • KT-35902 Kotlin generates a private parameterless constructor for constructors taking inline class arguments with default values
  • KT-36399 Gradually support TYPE_USE nullability annotations read from class-files
  • KT-36769 JVM IR: Missing LVT entries for inline function (default) parameters at call site
  • KT-36982 JVM IR: SAM adapter classes are generated as synthetic
  • KT-37007 JVM IR: extraneous property accessors are generated in multifile facade for InlineOnly property
  • KT-37317 [FIR] Add support of extension functions in postponed lambda completion
  • KT-38400 FIR: interface abstract is preferred to Any method in super resolve
  • KT-38536 JVM IR: bound adapted function references are not inlined
  • KT-38656 FIR: determine overridden member visibility properly
  • KT-38901 FIR: Make behavior of integer literals overflow consistent with FE 1.0
  • KT-39709 [FIR] False positive UNINITIALIZED_VARIABLE in presence of complex graph with jumps
  • KT-39923 Result.Failure will get wrapped with Success when using with RxJava
  • KT-40198 '$default' methods in 'kotlin/test/AssertionsKt' generated as non-synthetic by JVM_IR
  • KT-40200 IDE: Multiple top-level main functions in different files: broken highlighting, "No descriptor resolved for FUN"
  • KT-40262 ACC_DEPRECATED flag not generated for property getter delegate in multifile class facade in JVM_IR
  • KT-40282 Inline class wrapping Any gets double boxed
  • KT-40464 JVM_IR does not generate LINENUMBER at closing brace of (suspend) lambda
  • KT-40500 Warnings reporting by Java nullability annotations doesn't work for not top-level types
  • KT-40926 IDE import actions do not add required import for convention invoke() extension call
  • KT-40948 IllegalAccessError while initializing val property in EXACTLY_ONCE lambda that is passed to another function
  • KT-40991 NI: UNRESOLVED_REFERENCE_WRONG_RECEIVER instead of FUNCTION_EXPECTED with convention invoke call
  • KT-41163 Double wrapped value in Result class after map operation
  • KT-41284 Spring CGLIB proxies break auto-generated data class componentN and copy methods when using JVM IR
  • KT-41468 JVM IR: IllegalAccessError on access to abstract base member from another package, from anonymous object inside abstract class
  • KT-41491 UNRESOLVED_REFERENCE_WRONG_RECEIVER instead of FUNCTION_EXPECTED when invoking non-functional value as a function
  • KT-41493 JVM IR: names of classes for local delegated variables contain the variable name twice
  • KT-41792 [FIR] Introduce & use ConeAttribute.UnsafeVariance
  • KT-41793 [FIR] Make captured types accessible at the end of resolve
  • KT-41809 JVM IR: name for internal $default method doesn't include module name
  • KT-41810 JVM IR: Deprecated(HIDDEN) class is incorrectly generated as synthetic
  • KT-41841 JVM IR: delegates for private functions with default arguments are generated in multifile classes
  • KT-41857 Flaky 'ConcurrentModificationException' through kotlin.serialization.DescriptorSerializer
  • KT-41903 JVM IR: do not generate LineNumberTable in auto-generated members of data classes
  • KT-41911 JVM IR: nested big-arity function calls are not lowered
  • KT-41957 JVM IR: step into suspend function goes to the first line of the file
  • KT-41960 JVM IR: smart step into members implemented with dele...
Read more

Kotlin 1.4.30-RC

18 Jan 15:58

Choose a tag to compare

CHANGELOG

1.4.30-RC

Info about particular features

  • JVM IR backend reaches Beta
  • Inline classes improvements
  • JVM records preview with -language-version 1.5 and -Xjvm-enable-preview
  • Sealed interfaces preview with -language-version 1.5

New Features

  • KT-41265 Support noarg compiler plugin for JVM IR
  • KT-43592 Promote JVM IR compiler backend to Beta
  • KT-43919 Support loading Java annotations on base classes and implementing interfaces' type arguments
  • KT-44021 Enable JVM IR backend by default in 1.5

Fixes

  • KT-11454 Load annotations on TYPE_USE/TYPE_PARAMETER positions from Java class-files
  • KT-11732 Verify error for generic interface method invocation with default parameters
  • KT-14612 "ISE: Recursive call in a lazy value" during processing of a (weakly) recursive type alias
  • KT-18344 Upper bound of a typealias type parameter is not reported correctly if it contains the typealias itself
  • KT-18768 @NotNull annotation from Java does not work with varargs
  • KT-20548 java.lang.IllegalStateException: Illegal class container on simple Java code parsing
  • KT-23816 Inline classes: constants and annotations
  • KT-24158 AE: No receiver found on incomplete code with $-signs
  • KT-24392 Nullability of Java arrays is read incorrectly if @nullable annotation has both targets TYPE_USE and VALUE_PARAMETER
  • KT-29735 KNPE at KtEnumEntrySuperclassReferenceExpression.getReferencedElement with explicit type argument inside enum member constructor
  • KT-31389 ClassFormatError with companion object in annotation with @JvmStatic
  • KT-31907 ISE: UNIT_EXPECTED_TYPE on parsing array literal inside lambda with Unit return type
  • KT-36399 Gradually support TYPE_USE nullability annotations read from class-files
  • KT-41163 Double wrapped value in Result class after map operation
  • KT-41284 Spring CGLIB proxies break auto-generated data class componentN and copy methods when using JVM IR
  • KT-41911 JVM IR: nested big-arity function calls are not lowered
  • KT-42001 Cannot resolve symbol: AssertionError: Module <sdk 1.8> is not contained in his own dependencies
  • KT-42036 IR: "AssertionError: TypeAliasDescriptor expected: deserialized class Nothing" when referencing typealias with @UnsafeVariance
  • KT-42530 "AssertionError: No type for resolved lambda argument" on attempting to assign a Pair to a couple of values in a scratch file
  • KT-42622 NI: IllegalStateException for if expression with method reference inside flow
  • KT-43051 JVM IR: extraneous methods overridding default (Java 8) collection methods in inline class that extends MutableList
  • KT-43067 Inner class declaration inside inline class should be prohibited
  • KT-43225 Confusing message of warning NULLABLE_TYPE_PARAMETER_AGAINST_NOT_NULL_TYPE_PARAMETER
  • KT-43459 JVM_IR. Wrong signature for synthetic $annotations method for extension property on nullable primitive
  • KT-43478 NI: "IndexOutOfBoundsException: Index: 3, Size: 3" caused by is check with raw type inside if condition with when inside
  • KT-43519 JVM_IR. External functions generated differently in multi file facades
  • KT-43524 JVM_IR. Missed deprecation flag on companion @JvmStatic property accessor
  • KT-43536 JVM IR: IllegalStateException is not caught by runCatching under Deferred.await() with kotlinx.coroutines
  • KT-43587 Invalid default parameter value in expect actual declaration on jvm
  • KT-43630 "AssertionError: Number of arguments should not be less than number of parameters" during capturing intersection raw type with star projection
  • KT-43698 NoSuchMethodError for inline class implementing interface with @JvmDefault methods, -Xjvm-default=enable
  • KT-43741 Report error on inline class implementing 'kotlin.Cloneable'
  • KT-43845 org.jetbrains.kotlin.codegen.CompilationException: Back-end (JVM) Internal error: Failed to generate expression: KtBlockExpression
  • KT-43956 NI: "Error type encountered – UninferredParameterTypeConstructor" on "try" and other constructs with code block as a value
  • KT-44055 Left uninferred type parameter for callable references inside special calls
  • KT-44113 Compiler frontend exception: Number of arguments should not be less than number of parameters, but: parameters=2, args=1
  • KT-44145 No highlighting for not initialized base constructor and NoSuchMethodError in Android plugin

IDE

New Features

  • KT-44075 Sealed interfaces: New Kotlin Class/File menu update

Fixes

  • KT-29454 Light class with unexpected name when using obfuscated library
  • KT-42194 OOME: Java heap space from incremental compilation
  • KT-44116 Add language version 1.5 to the compiler configuration preferences

IDE. Android

IDE. Completion

  • KT-44016 Code completion: support for "sealed interface"

IDE. Gradle. Script

  • KT-39105 AE “JvmBuiltins has not been initialized properly” after creating new Gradle/Kotlin-based project via old Project Wizard

IDE. Inspections and Intentions

New Features

  • KT-44017 Sealed interfaces: Java side Inspection "implementation of Kotlin sealed interface is forbidden"
  • KT-43941 Sealed interfaces: intention to extend class/interface

IDE. Misc

  • KT-44018 Sealed interfaces: IDE side implementation for hierarchy provider

IDE. Multiplatform

  • KT-40814 MISSING_DEPENDENCY_CLASS when consuming native-shared library in a source-set with fewer targets than library has

IDE. Run Configurations

  • KT-34535 Unable to run common tests on Android via gutter icon in a multiplatform project

IDE. Scratch

  • KT-25038 Scratch: Destructuring declaration produces an unresolved reference

IDE. Script

  • KT-44117 IDE / Scripts: custom kotlin script definitions aren't loaded

JavaScript

Fixes

  • KT-41076 KJS / IR: "AssertionError: Assertion failed" caused by overridden extensiion function in child class
  • KT-42357 KotlinJS - external class constructor with vararg does not correctly handle spread operator.
  • KT-43212 JS IR: support init blocks inside inline classes
  • KT-43901 Call to enum values() method from enum companion object leads to non-initialized enum instances

Libraries

  • KT-41278 map.entries.contains can return false if the argument is not MutableEntry

Middle-end. IR

  • KT-41765 [Native/IR] Could not resolveFakeOverride()
  • KT-42054 Psi2ir: "RuntimeException: IrSimpleFunctionSymbolImpl is already bound" when using result of function with overload resolution by lambda return type

Native

  • KT-44271 [Kotlin/Native] Incorrect linking when targeting linux_x64 from mingw_x64 host
  • KT-44219 1.4.30-M1: Non-reified type parameters with recursive bounds are not supported yet

Nativ...

Read more

Kotlin 1.4.21-2

30 Dec 12:19

Choose a tag to compare

Kotlin 1.4.21-2 Pre-release
Pre-release

This release contains the fix for the kotlinx.serialization plugin working together with Jetpack Compose plugin.

Please use the 1.4.21 version for your usual production work and use this version only if you want to experiment on kotlinx.serialization and Jetpack Compose together.