Skip to content

Releases: JetBrains/kotlin

Kotlin 1.6.0-RC

12 Oct 15:28

Choose a tag to compare

Kotlin 1.6.0-RC Pre-release
Pre-release

Learn how to install Kotlin 1.6.0-RC.

Changelog

Compiler

Fixes

  • KT-49157 Tail-call optimization miss with cast to type parameter
  • KT-48778 -Xtype-enhancement-improvements-strict-mode not respecting @NonNull annotation for property accesses?
  • KT-46437 NI: "Throwable: Resolution error of this type shouldn't occur for resolve if as a call" caused by reflectively accessing private property inside "if/else" or "when" expression
  • KT-48590 IllegalArgumentException: ClassicTypeSystemContext couldn't handle: Captured(*) reified type class reference
  • KT-48261 "overload resolution ambiguity" for JSpecify+jsr305-annotated Java List implementation
  • KT-48633 Can't infer builder inference's type argument across local class
  • KT-49136 JVM IR: NPE with safe call chain and property set to null by reflection
  • KT-48912 K/N Symbol with IrSimpleFunctionSymbolImpl is unbound and JS Validation failed in file shaders.kt
  • KT-48928 Prohibit using old JVM backend with language version >= 1.6
  • KT-41978 NI: Kotlin fails to infer type of function argument
  • KT-48732 JVM / IR: MalformedParameterizedTypeException is thrown when a Spring Bean of suspending function type is registered
  • KT-47841 Turning LV to 1.6 breaks some diagnostics based on jspecify annotations
  • KT-48498 JVM IR: IllegalAccessError with inline function call and property delegation from different module
  • KT-48319 JVM / IR: AssertionError: FUN caused by suspend lambda inside anonymous function
  • KT-48835 Psi2ir: vararg parameter value is lost when translating adapted function reference to base class member
  • KT-46908 JVM / IR: do not wrap fun interface implementation into another SAM adapter if it inherits from a functional type
  • KT-48927 JVM IR: "VerifyError: Bad invokespecial instruction: current class isn't assignable to reference class" when up-casting and read a base class's private property that has a custom getter in the base class's public function
  • KT-48992 Postpone migration to new operator resolution scheme for integer literals
  • KT-48290 Type bounds warning based on Java annotations not issues with language level 1.6
  • KT-47920 There is no warning on violated nullability of type parameter in accordance with java nullability annotation
  • KT-48851 Keep using warn mode for jspecify in 1.6
  • KT-46829 IR: NullPointerException caused by setting scoped generic extension var
  • KT-44843 PSI2IR: "org.jetbrains.kotlin.psi2ir.generators.ErrorExpressionException: null: KtCallExpression" with delegate who has name or parameter with the same name as a property
  • KT-42972 Forbid protected constructor calls from public inline functions
  • KT-45378 Prohibit super calls in public-api inline functions
  • KT-48515 JSpecify: If a class has a @Nullable type-parameter bound, Kotlin should still treat unbounded wildcards like platform types
  • KT-48825 JVM IR: NPE with delegated property "by this" to base class
  • KT-48535 Make EXPERIMENTAL_ANNOTATION_ON_OVERRIDE warning
  • KT-48478 JVM IR: Coroutines 1.5.1 + Kotlin 1.5.30 - ClassCastException: CompletedContinuation cannot be cast to DispatchedContinuation
  • KT-48671 JVM / IR: "AssertionError: Primitive array expected: CLASS IR_EXTERNAL_DECLARATION_STUB CLASS"
  • KT-46181 JVM IR: private @JvmStatic function is generated in the outer class instead of companion object, which breaks existing calls via JNI or reflection (e.g. JUnit @MethodSource)
  • KT-48736 JVM IR: assert in SyntheticAccessorLowering when inline function attempts to access package-private field from Java
  • KT-20542 IllegalAccessError on calling private function with default parameters from internal inline function used in another package
  • KT-48331 JVM / IR: "VerifyError: Bad access to protected data in invokevirtual" when a sealed class uses another sealed class in its same hierarchy level as a constructor parameter
  • KT-48659 JVM / IR: Referential equality returns true for different instances
  • KT-48606 [1.6] Instantiated annotations do not implement hashCode correctly/consistently
  • KT-48316 "No value passed for parameter" regression with Java annotation default values with JSR-305
  • KT-48391 JVM / IR: "AssertionError: SyntheticAccessorLowering should not attempt to modify other files!" caused by class which inherits interface which has default function with default argument from companion const val

IDE. Gradle Integration

  • KT-46273 MPP: Don't fail import for case of missed platform in source set structure
  • KT-48823 Improve error reporting on import when configuration phase in Gradle failed
  • KT-48504 MPP: UninitializedPropertyAccessException on import if new hierarchical mpp flag conflicts with other flags

Libraries

New Features

  • KT-46423 infix extension fun Comparable.compareTo
  • KT-47421 Stabilize collection builders

Performance Improvements

  • KT-45438 Remove brittle ?contains? optimization in minus/removeAll/retainAll

Fixes

  • KT-47304 Random#nextLong generates value outside provided range
  • KT-48999 Align behavior of some JS functions with their JVM counterpart
  • KT-28378 Different behavior of Regex replace function in Java and JS when replacement string contains group reference
  • KT-46229 Bring back Duration factory extension properties
  • KT-46243 Typography.leftGuillemete and Typography.rightGuillemete are named inconsistent with standard
  • KT-46101 Review deprecations in stdlib for 1.6
  • KT-48456 Introduce Common (multi-platform) readln() and readlnOrNull() top-level functions
  • KT-38754 Deprecate appendln in favor of appendLine

Native

  • KT-48807 Cinterop: cannot create bindings for a framework when Xcode 13 RC is installed

Tools. CLI

  • KT-49007 Support three previous API versions

Tools. Compiler Plugins

  • KT-48842 Compiler crash: Symbol with IrFieldSymbolImpl is unbound
  • KT-48117 Kotlin AllOpen Plugin should open private methods

Tools. Gradle

  • KT-48745 JVM target compatibility check should be disabled when Java sources are empty
  • KT-49066 Setting kotlinOptions.modulePath in an android project breaks incremental compilation
  • KT-48847 Remove deprecated kotlin options marked for removal after 1.5
  • KT-48245 KGP makes compileOnly configuration resolvable
  • KT-48768 Misleading 'jdkHome' deprecation message

Tools. Gradle. Multiplatform

  • KT-48919 Gradle multiplatform plugin 1.6.0-M1 does not accept apiVersion = "1.7"

Tools. Scripts

  • KT-49012 Compiling .kts script with inner class declaration fails with Backend Internal Error caused by AE: "Local class constructor can't have dispatch receiver"

Tools. kapt

Read more

Kotlin 1.6.0-M1

24 Sep 06:19

Choose a tag to compare

Kotlin 1.6.0-M1 Pre-release
Pre-release

Learn how to install Kotlin 1.6.0-M1.

Changelog

Android

  • KT-48019 Bundle Kotlin Tooling Metadata into apk artifacts
  • KT-47733 JVM / IR: Android Synthetic don't generate _findCachedViewById function

Compiler

New Features

  • KT-12794 Allow runtime retention repeatable annotations when compiling under Java 8
  • KT-47984 In-place arguments inlining for @InlineOnly functions
  • KT-48194 Try to resolve calls where we don't have enough type information, using the builder inference despite the presence of the annotation
  • KT-26245 Add ability to specify generic type parameters as not-null
  • KT-45949 Kotlin/Native: Improve bound check elimination
  • KT-47699 Support programmatic creation of class annotations and corresponding feature flag on JVM
  • KT-47736 Support conversion from regular functional types to suspending ones in JVM IR
  • KT-39055 Support property delegate created via synthetic method instead of field

Performance Improvements

  • KT-33835 Bytecode including unnecessary null checks for safe calls where left-hand side is non-nullable
  • KT-41510 Compilation of kotlin html DSL is still too slow
  • KT-48211 We spend a lot of time in ExpectActual declaration checker when there is very small amount of actual/expect declaration
  • KT-39054 Optimize delegated properties which call get/set on the given KProperty instance on JVM
  • KT-47918 JVM / IR: Performance degradation with const-bound for-cycles
  • KT-47785 Compilation time increased when trying to compile AssertJ DB expression in 1.5.21
  • KT-46615 Don't generate nullability assertions in methods for directly invoked lambdas

Fixes

  • KT-48523 Kotlin/Native: cross-compilation from Linux to MinGW not working when platform.posix is used
  • KT-48295 JVM / IR: VerifyError: Bad access to protected data in getfield
  • KT-48440 JVM IR: Missing checkcast in generated bytecode causes VerifyError in Kotlin 1.5.30
  • KT-48794 Breaking change in 1.5.30: Builder inference lambda contains inapplicable calls so {1} cant be inferred
  • KT-48653 Warnings on non-exhaustive when statements missing in some cases with 1.6
  • KT-48394 JVM: Invalid locals caused by unboxing bytecode optimization
  • KT-48380 kotlin.RuntimeException: Unexpected receiver type
  • KT-47855 Kotlin/Native: compilation fails due to Escape Analysis
  • KT-48291 False positive [ACTUAL_MISSING] Declaration must be marked with 'actual' when implementing actual interface
  • KT-48613 Kotlin/Native fails to compile debug binaries for watchosArm64 target
  • KT-48618 Enable by default "suspend conversion" feature in 1.6
  • KT-48543 Native compiler crashes because of bridges for $default stubs
  • KT-47328 JVM / IR: NoSuchFieldError with missing CHECKCAST
  • KT-47638 Drop EXPERIMENTAL_IS_NOT_ENABLED diagnostic
  • KT-48349 OptIn markers are forbidden on local variable / value parameter / property getter only in presence of explicit Target annotation
  • KT-48589 KotlinTypeRefiner is lost, leading to TYPE_MISMATCH and OVERLOAD_RESOLUTION_AMBIGUITY issues with MPP projects
  • KT-48615 Inconsistent behavior with integer literals overflow (Implementation)
  • KT-47937 Implement deprecation of computing constant values of complex boolean expressions in when condition branches and conditions of loops
  • KT-47772 False negative WRONG_ANNOTATION_TARGET on type argument to function call
  • KT-48552 Kotlin/Native: iosArm64 debug build fails in 1.6.0-M1-139
  • KT-46182 Native: prohibit using dots in identifiers
  • KT-47917 JVM: "UTF8 string too large" caused by a big string
  • KT-46230 JVM IR: "IllegalArgumentException: Null argument in ExpressionCodegen for parameter VALUE_PARAMETER MOVED_DISPATCH_RECEIVER" with value class overriding function with default parameter
  • KT-48302 FIR: Investigate not-null assertion on generic Java method
  • KT-47422 -Xjspecify-annotations: If a class has a @Nullable type-parameter bound, Kotlin should still treat some users' type arguments as platform types
  • KT-48500 AE: "Last parameter type of suspend function must be Continuation, but it is kotlin.coroutines.experimental.Continuation" for kotlin-stdlib-common library
  • KT-48469 Problem with properties lazy initialization while using kotlinx.serialization plugin
  • KT-48432 Regression in IntRange.contains (and probably other ranges too) when used in-place
  • KT-48361 INTEGER_OPERATOR_RESOLVE_WILL_CHANGE is not reported in some positions
  • KT-44855 "AssertionError: SyntheticAccessorLowering should not attempt to modify other files" on smart cast of protected field owner
  • KT-47499 JVM / IR: java.lang.VerifyError: Bad access to protected data in invokevirtual when trying to clone the result of lambda invocation that is "this" in an extension function
  • KT-46451 JVM Debugging: stepping on finally block end brace line before stepping into finally code
  • KT-48329 It's impossible to infer a type variables based on several builder inference lambdas
  • KT-48193 Don't use the builder inference for calls which can be resolved without it
  • KT-46450 JVM Debugging: some break statements in catch blocks have no line numbers and you cannot set breakpoints on them
  • KT-48172 "IllegalStateException: Cannot serialize error type: [ERROR : ]" in 1.5.21 with java kotlin interop
  • KT-48262 "Inconsistent type" with JSpecify @NullMarked
  • KT-46697 IllegalStateException: IrTypeAliasSymbol expected: Unbound public symbol for public kotlinx.coroutines/CancellationException|null[0] compiling KMM module for Kotlin/Native with Kotlin 1.5
  • KT-47285 IR deserialization exception when dependency KLIB has class instead of typealias
  • KT-41378 Compilation failed: Deserializer for declaration public kotlinx.coroutines/SingleThreadDispatcher|null[0] is not found
  • KT-47988 JVM / IR: "VerifyError: Bad type on operand stack" when invoking apply with a local method reference
  • KT-47833 False positive "Type argument is not within its bounds " with upcasting in 1.5.30-M1
  • KT-47911 Native compiler on ios_arm64 target generates movi.2d instructions, which are mishandled by Apple hardware
  • KT-14392 Repeated annotation with use site target is not detected for getter and setter
  • KT-47493 Missed frontend diagnostic in try/catch
  • KT-47597 JVM IR: if statement doesn't eval correctly on 1.5.20 possible nullable type differences.
  • KT-47922 False negative type mismatch on empty when as last statement of lambda
  • KT-47830 Some code doesn't compile with unrestricted builder inference
  • KT-34594 Do not generate fake debugger varia...
Read more

Kotlin 1.5.31

20 Sep 08:17

Choose a tag to compare

Changelog

Compiler

Fixes

  • KT-48659 JVM / IR: Referential equality returns true for different instances
  • KT-48613 Kotlin/Native fails to compile debug binaries for watchosArm64 target
  • KT-48316 "No value passed for parameter" regression with Java annotation default values with JSR-305
  • KT-48343 Mistake in an error message for uninferred type variable without unrestricted builder inference
  • KT-48543 Native compiler crashes because of bridges for $default stubs
  • KT-48349 OptIn markers are forbidden on local variable / value parameter / property getter only in presence of explicit Target annotation
  • KT-48295 JVM / IR: VerifyError: Bad access to protected data in getfield
  • KT-48551 JVM / IR: "IllegalStateException: Inline class has no primary constructor" caused by inline class from one module and fun interface from another
  • KT-47917 JVM: "UTF8 string too large" caused by a big string
  • KT-48440 JVM IR: Missing checkcast in generated bytecode causes VerifyError in Kotlin 1.5.30
  • KT-48361 INTEGER_OPERATOR_RESOLVE_WILL_CHANGE is not reported in some positions
  • KT-48267 JVM IR: CCE on callable reference to Array constructor passed to inline function

IDE

  • KTIJ-15744 Reopening build.gradle.kts-based project reports MISSING_SCRIPT_BASE_CLASS KotlinBuildScript until re-import
  • KTIJ-19005 JDK 17: "PermittedSubclasses requires ASM9" exception multiple times per second during analysis
  • KTIJ-19504 IDE highlighting: Kotlin plugin 1.5.30 started showing some valid classes from multiplatform libraries as not existing

Native

  • KT-48591 Kotlin/Native: Char.isHighSurrogate and Char.isLowSurrogate return wrong result for macosArm64 and iosArm64 with compiler cache enabled
  • KT-48491 CInterop broke in Kotlin 1.5.30

Checksums

File Sha256
kotlin-compiler-1.5.31.zip 661111286f3e5ac06aaf3a9403d869d9a96a176b62b141814be626a47249fe9e
kotlin-native-linux-x86_64-1.5.31.tar.gz 636b7e9e54eefa3fa1d284677a8ec2271d0f98b024a8a60127ef20a3badaae03
kotlin-native-macos-x86_64-1.5.31.tar.gz fde7224a8e04a6cd934ecbf55d4d51966f8a0668104f4316a76b3f38062d1ade
kotlin-native-macos-aarch64-1.5.31.tar.gz fbd005e360253e7d7ff1cd78b7cbbe34df0592812676deada6620a53d469d803
kotlin-native-windows-x86_64-1.5.31.zip 11c2e3378ea2e0121e9c3378e58f9813fc5f7850110c0e341739ab514f1379ca

Kotlin 1.5.30

24 Aug 13:56

Choose a tag to compare

Changelog

Backend. Native. Debug

  • KT-47405 Incorrect path from inlined method in stacktrace on iOS-simulator ARM64
  • KT-47408 Incorrect line number of inlined method on iOS-simulator ARM64

Compiler

New Features

  • KT-44261 Support RxJava 3 nullability annotations
  • KT-32443 Experimental declarations should be contagious even when they are not explicitly used
  • KT-45844 Forbid using experimental markers on override declarations
  • KT-45845 Forbid using experimental markers on getter
  • KT-46644 Resolve overrides for IrProperty on deserialization
  • KT-46967 Support class type parameters annotations in FIR
  • KT-47402 Native: optimize access to object declarations that have only const vals and no init blocks
  • KT-47709 Make when statements with enum, sealed, and Boolean subjects exhaustive by default
  • KT-47699 Support programmatic creation of class annotations and corresponding feature flag on JVM

Performance Improvements

  • KT-45103 Direct invoke optimization
  • KT-47785 Compilation time increased when trying to compile AssertJ DB expression in 1.5.21

Fixes

  • KT-48361 INTEGER_OPERATOR_RESOLVE_WILL_CHANGE is not reported in some positions
  • KT-48180 JVM / IR: AssertionError: "Lambda with offset already exists" caused by calling inline function with default lambda parameter
  • KT-47328 JVM / IR: NoSuchFieldError with missing CHECKCAST
  • KT-48172 "IllegalStateException: Cannot serialize error type: [ERROR : ]" in 1.5.21 with java kotlin interop
  • KT-48230 JVM IR: CCE for multiple receivers case
  • KT-48262 "Inconsistent type" with JSpecify @NullMarked
  • KT-48167 JVM / IR: If Map#entrySet is implemented in an interface, Kotlin compiler generates incorrect code for its implementation
  • KT-47988 JVM / IR: "VerifyError: Bad type on operand stack" when invoking apply with a local method reference
  • KT-48163 JVM / IR: "VerifyError: Bad type on operand stack" when throwing result of smartcast
  • KT-47833 False positive "Type argument is not within its bounds " with upcasting in 1.5.30-M1
  • KT-47830 Some code doesn't compile with unrestricted builder inference
  • KT-39883 Deprecate computing constant values if complex boolean expressions in when condition branches and conditions of loops
  • KT-47037 Eliminate builder inference restrictions
  • KT-46726 IR + BuilderInference: AssertionError: Unbound private symbol on usage of this in a BuilderInference lambda
  • KT-43855 Support gradual introduction of new nullability annotations
  • KT-43142 FIR: Check UPPER_BOUND_VIOLATED for type alias constructors properly
  • KT-45228 Leaking builder inference type variables though callable references
  • KT-42270 NI: NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER for BuilderInference with extension functions
  • KT-46029 JVM / IR: "Unbound private symbol: " when trying to save SequenceScope in property
  • KT-45258 Wrong CST between types which contain stub type
  • KT-45224 Type safety problem through leaking of the builder inference scope
  • KT-22852 Report diagnostics on implicit usages of experimental API
  • KT-22941 Experimental marker annotation with SOURCE retention is compiled without error
  • KT-24993 Inference for buildSequence/yield doesn't work for labeled lambdas
  • KT-31728 Incorrect EXPERIMENTAL_OVERRIDE_ERROR for override of experimental function in anonymous object
  • KT-33364 Kotlin/Native debugger: execution stops only at next line for breakpoint at when expression without parameter
  • KT-42139 NI: NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER for emptyList / listOf (with no arguments) / emptyMap / mapOf (with no arguments) inside if block inside sequence block
  • KT-44241 NI: BuilderInference regression
  • KT-44372 FIR: KClass::java cannot be resolved as callable reference
  • KT-44547 Native: wrong RTTI when overriding functions with equal signatures but different type arguments
  • KT-44571 Segfault on unnecessary int unboxing
  • KT-45083 Problem with property reference in builder inference
  • KT-45315 Deprecate (V)::a reference resolution to companion in FE 1.0
  • KT-46393 AE: "1 trailing arguments were found in Any type" for private function with implicit anonymous return type inside generic class
  • KT-46661 FIR: Investigate inference issue with self-types and star projection
  • KT-46775 [Native] [IR] Support multiple suspend lambdas as class supertypes
  • KT-46836 Error: Invalid LLVM module on inlineClasses external tests
  • KT-46838 NullPointerException: Parameter specified as non-null is null in CollectionsKt.joinToString()
  • KT-46896 Native IR: NPE when using irBuiltIns.suspendFunction
  • KT-46996 FIR: INFERENCE_NO_INFORMATION_FOR_PARAMETER on type aliases with non-trivial expansions
  • KT-47034 KtValueArgument.getArgumentExpression could lead to StubBasedPsiElementBase.notBoundInExistingAst
  • KT-47052 BuilderInference case with flatMapTo doesn't work properly
  • KT-47082 Stub type variable is leaked (reproduces with K/N during deserialization)
  • KT-47143 ClassicTypeSystemContext couldn't handle: Captured(*) in Kotlin 1.5.0
  • KT-47148 Type mismatch: inferred type is Any? but T? was expected
  • KT-47180 Forbid using OptIn markers on local variable, value parameter or field
  • KT-47181 Forbid using OptIn markers on types or type parameters
  • KT-47183 Segfault on int unboxing
  • KT-47208 Backend Internal error: Exception during IR lowering: assert at IrOverridingUtilKt.buildFakeOverrideMember
  • KT-47276 Nullability annotations without target are ignored if type enhancement improvements are enabled
  • KT-47450 StackOverflowException in psi2ir with many chained binary expressions
  • KT-47462 K/N: AssertionError: Unbound private symbol org.jetbrains.kotlin.ir.symbols.impl.IrClassSymbolImpl@6cb748db (NON-PUBLIC API): deserialized class Companion
  • KT-47941 "IllegalStateException: Expected some types" on a call with several excepted type constraints
  • KT-47854 "IllegalArgumentException: Type is inconsistent" with Android's @nullable annotation starting in Kotlin 1.5.20
  • KT-47899 "AssertionError: Intersection type should not be marked nullable" with 1.5.21
  • KT-47846 Stack overflow when handling enhanced recursive type parameter
  • KT-47747 Introduce specific error for calls which could be resolved only with unrestricted builder inference
  • KT-47739 ...
Read more

Kotlin 1.5.30-RC

09 Aug 15:25

Choose a tag to compare

Kotlin 1.5.30-RC Pre-release
Pre-release

Changelog

Backend. Native. Debug

  • KT-47405 Incorrect path from inlined method in stacktrace on iOS-simulator ARM64
  • KT-47408 Incorrect line number of inlined method on iOS-simulator ARM64

Compiler

New Features

  • KT-47709 Make when statements with enum, sealed, and Boolean subjects exhaustive by default
  • KT-47699 Support programmatic creation of class annotations and corresponding feature flag on JVM

Performance Improvements

  • KT-47785 Compilation time increased when trying to compile AssertJ DB expression in 1.5.21

Fixes

  • KT-47941 "IllegalStateException: Expected some types" on a call with several excepted type constraints
  • KT-47854 "IllegalArgumentException: Type is inconsistent" with Android's @nullable annotation starting in Kotlin 1.5.20
  • KT-47899 "AssertionError: Intersection type should not be marked nullable" with 1.5.21
  • KT-47846 Stack overflow when handling enhanced recursive type parameter
  • KT-47747 Introduce specific error for calls which could be resolved only with unrestricted builder inference
  • KT-47739 JVM / IR: NoSuchFieldError with generic sealed classes
  • KT-47422 -Xjspecify-annotations: If a class has a @nullable type-parameter bound, Kotlin should still treat some users' type arguments as platform types
  • KT-47437 Type inference failure with raw types under -Xjspecify-annotations=strict
  • KT-47396 <?> in @NullMarked code should permit nullable types
  • KT-47729 False positive INTEGER_OPERATOR_RESOLVE_WILL_CHANGE warning: "expression will be resolved to Int in future releases"
  • KT-47333 Xcode 13: Compilation for iOS simulator fails
  • KT-47772 False negative WRONG_ANNOTATION_TARGET on type argument to function call
  • KT-47467 JVM / IR: "AssertionError: Annotation class expected: deserialized class Array" caused by java annotation as a parameter of another annotation
  • KT-47744 UninitializedPropertyAccessException compiler exception on nested builder inference calls
  • KT-47724 Type inference: False positive "Returning type parameter has been inferred to Nothing implicitly"
  • KT-47660 JVM / IR: Mockito verification fails when named parameters are ordered differently
  • KT-47589 Using RequiresOptIn annotation on constructor property results in error even if the annotation has no VALUE_PARAMETER target

IDE

  • KT-47947 Add language version 1.6 to the compiler configuration preferences

Libraries

  • KT-23351 Regex.splitToSequence, CharSequence.splitToSequence(Regex)
  • KT-42851 kotlin.time.Duration toString() shows wrong result for seconds
  • KT-45325 Parsing Duration from String
  • KT-34021 Regex.matchAt / matchesAt

Native. Stdlib

  • KT-47915 Kotlin/Native: Provide access to test cases generated by the compiler

Reflection

  • KT-47650 KClass::nestedClasses throws ClassCastException for script classes with type aliases

Tools. CLI

  • KT-47623 Deprecate -Xuse-experimental
  • KT-30778 kotlin-compiler.jar contains shaded but not relocated kotlinx.coroutines

Tools. Commonizer

  • KT-47433 [Commonizer] Commonize functions/properties with TA/Class types in signature
  • KT-47691 [Commonizer] Commonize var and val properties
  • KT-47434 [Commonizer] Commonize parameterized (type-alias + class) types
  • KT-47432 [Commonizer] Commonize (type-alias + class) types used in functions

Tools. Daemon

  • KT-47152 Incremental Compilation with Kotlin compile daemon and JDK 17 fails with IllegalAccessException

Tools. Gradle

New Features

  • KT-45757 Add an easier way to explicitly set Kotlin daemon jvm arguments

Fixes

  • KT-47940 Kotlin JVM toolchain breaks configuration cache
  • KT-46626 kotlin-android plugin with kotlin-dsl: Extension with name 'android' does not exist. Currently registered extension names: [ext, kotlin, kotlinTestRegistry]
  • KT-47754 “'compileDebugUnitTestJavaWithJavac' task (current target is 1.8)” during build android project without specified target and with jvmToolchain = JDK 11
  • KT-47520 Kotlin and Java target compatibility check produces false positive on using Gradle toolchains
  • KT-46978 Duplicate resource errors on gradle 7 with multi-module multiplatform project with withJava
  • KT-27687 Empty directories in source set causes gradle cache miss for KotlinCompile task
  • KT-47635 Kotlin version conflict on using 'noarg' Gradle plugin
  • KT-47636 Kotlin version conflict on using 'sam-with-receiver' Gradle plugin
  • KT-47354 Kotlin version conflict on using 'allopen' Gradle plugin
  • KT-45202 Kapt crashes with java.io.UTFDataFormatException

Tools. Gradle. JS

  • KT-47559 KJS / Gradle: Run task created using eager API and breaks task configuration avoidance

Tools. Gradle. Multiplatform

  • KT-38111 Gradle DSL: rename useExperimentalAnnotation function
  • KT-47612 Task :buildKotlinToolingMetadata is incompatible with Gradle configuration cache
  • KT-47611 Task :generateMetadataFileForKotlinMultiplatformPublication is incompatible with Gradle configuration cache

Tools. Gradle. Native

  • KT-47653 Support multi arch build via embedAndSign task
  • KT-47078 Support Apple Silicon in cocoapods gradle plugin
  • KT-47077 Support Apple Silicon in embedAndSign task

Tools. Maven

  • KT-45689 JDK-16: kotlin-maven-plugin fails with IllegalAccessError: class com.intellij.util.io.FileChannelUtil when using incremental compilation

Tools. Scripts

  • KT-43917 Gradle dependency conflict with resolutionStrategy failOnVersionConflict and kotlin 1.4

Checksums

File Sha256
kotlin-compiler-1.5.30-RC.zip 5b59032acde09c1eab1c73ac5d494cc0b9abbe4183230ceb60039e561586a958
kotlin-native-linux-x86_64-1.5.30-RC.tar.gz 7a3d09ae6053af5278b23c92336a7dc4177bb8642da0b93cda8f05d7fa978d6b
kotlin-native-macos-x86_64-1.5.30-RC.tar.gz 05f298b4b82db524d27e9b114fa9047be84adf0cbfb655c773d9ea821b096d3c
kotlin-native-macos-aarch64-1.5.30-RC.tar.gz 3c7765b68f0c88cca3e7794e3511e0f48b69d9c0c1da13c249bd5f3307e3fe9f
kotlin-native-windows-x86_64-1.5.30-RC.zip 435feb53f5e3bd60d5cf4723ffed9fdc563632b375d509e3e61836fbf1626a98

Kotlin 1.5.30-M1

20 Jul 14:47

Choose a tag to compare

Kotlin 1.5.30-M1 Pre-release
Pre-release

Changelog

Compiler

New Features

  • KT-32443 Experimental declarations should be contagious even when they are not explicitly used
  • KT-45844 Forbid using experimental markers on override declarations
  • KT-45845 Forbid using experimental markers on getter
  • KT-46644 Resolve overrides for IrProperty on deserialization
  • KT-46967 Support class type parameters annotations in FIR
  • KT-47402 Native: optimize access to object declarations that have only const vals and no init blocks

Fixes

  • KT-22852 Report diagnostics on implicit usages of experimental API
  • KT-22941 Experimental marker annotation with SOURCE retention is compiled without error
  • KT-24993 Inference for buildSequence/yield doesn't work for labeled lambdas
  • KT-31728 Incorrect EXPERIMENTAL_OVERRIDE_ERROR for override of experimental function in anonymous object
  • KT-33364 Kotlin/Native debugger: execution stops only at next line for breakpoint at when expression without parameter
  • KT-42139 NI: NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER for emptyList / listOf (with no arguments) / emptyMap / mapOf (with no arguments) inside if block inside sequence block
  • KT-44241 NI: BuilderInference regression
  • KT-44372 FIR: KClass::java cannot be resolved as callable reference
  • KT-44547 Native: wrong RTTI when overriding functions with equal signatures but different type arguments
  • KT-44571 Segfault on unnecessary int unboxing
  • KT-45083 Problem with property reference in builder inference
  • KT-45315 Deprecate (V)::a reference resolution to companion in FE 1.0
  • KT-46393 AE: "1 trailing arguments were found in Any type" for private function with implicit anonymous return type inside generic class
  • KT-46661 FIR: Investigate inference issue with self-types and star projection
  • KT-46775 [Native] [IR] Support multiple suspend lambdas as class supertypes
  • KT-46836 Error: Invalid LLVM module on inlineClasses external tests
  • KT-46838 NullPointerException: Parameter specified as non-null is null in CollectionsKt.joinToString()
  • KT-46896 Native IR: NPE when using irBuiltIns.suspendFunction
  • KT-46996 FIR: INFERENCE_NO_INFORMATION_FOR_PARAMETER on type aliases with non-trivial expansions
  • KT-47034 KtValueArgument.getArgumentExpression could lead to StubBasedPsiElementBase.notBoundInExistingAst
  • KT-47052 BuilderInference case with flatMapTo doesn't work properly
  • KT-47082 Stub type variable is leaked (reproduces with K/N during deserialization)
  • KT-47143 ClassicTypeSystemContext couldn't handle: Captured(*) in Kotlin 1.5.0
  • KT-47148 Type mismatch: inferred type is Any? but T? was expected
  • KT-47180 Forbid using OptIn markers on local variable, value parameter or field
  • KT-47181 Forbid using OptIn markers on types or type parameters
  • KT-47183 Segfault on int unboxing
  • KT-47208 Backend Internal error: Exception during IR lowering: assert at IrOverridingUtilKt.buildFakeOverrideMember
  • KT-47276 Nullability annotations without target are ignored if type enhancement improvements are enabled
  • KT-47450 StackOverflowException in psi2ir with many chained binary expressions
  • KT-47462 K/N: AssertionError: Unbound private symbol org.jetbrains.kotlin.ir.symbols.impl.IrClassSymbolImpl@6cb748db (NON-PUBLIC API): deserialized class Companion

IDE

  • KT-44643 ISE: Could not generate LightClass for some declared in on initialisation by lazy in a JVM module of a multiplatform project

IDE. Gradle Integration

  • KT-47163 KJS / Gradle: Could not resolve <artifact> despite being resolvable & project buildable

IDE. JS

  • KT-47557 KJS: With NPM dependency IDEA import fails when performed before Gradle build

JavaScript

  • KT-38363 JS IR BE: support IC for lowerings
  • KT-45738 KJS / IR: Wrong generated code for when statement
  • KT-46520 KJS / IR: ISE "Can't find name for declaration FUN name:CharArray_init_$Create$" on callable reference to Array constructor
  • KT-46551 KJS / IR: Add a basic sourcemap generation

Libraries

  • KT-47477 Could not resolve kotlin-test during project import in case of multiplatform with only JVM target platform

Native

  • KT-35001 warning: linking module flags 'SDK Version': IDs have conflicting values ('[2 x i32] [i32 13, i32 2]'
  • KT-43475 Kotlin/Native compiler: Including a static C library increased cross-compilation time from 3.5minutes to 1 hour 40 minutes
  • KT-44148 Escape analysis failure: Heap space out of memory

Native. C and ObjC Import

  • KT-46711 platform.windows._LARGE_INTEGER cannot be passed by value

Native. ObjC Export

  • KT-43780 Improve Swift/Obj-C ergonomics for object and companion object
  • KT-46431 KMP accessing a property of an anonymous inner class that inherits from an abstract class causes a 'NSGenericException', reason: '[Shared_kobjcc0 ] is abstract' exception.
  • KT-47042 Kotlin/Native: Concurrency Interoperability with Objective-C (Swift 5.5)

Native. Platforms

  • KT-44321 Support Apple Silicon without Rosetta 2

Reflection

  • KT-18277 InvalidProtocolBufferException: Stream closed on multithreaded access to built-ins data in reflection
  • KT-44977 Reflection: ClassCastException caused by annotations with "AnnotationTarget.TYPE" usage on array attributes access

Tools. CLI

  • KT-40979 CLI: Executing "kotlinc.bat" at a root path, errors are not reported with a correct filepath
  • KT-40994 CLI: Add documentation for -J argument in kotlinc -help
  • KT-46764 CLI: Java record defined in a single file root is not resolved

Tools. Commonizer

  • KT-45992 [Commonizer] Allow commonization of TypeAlias and Class with same name
  • KT-46716 [Commonizer] Analyze leaf source sets with original platform libraries
  • KT-46957 [Commonizer] Unresolved classifier: platform/posix/ptrdiff_t for linuxMips32
  • KT-47133 Forbid cinterop commonization with hierarchical commonization turned off
  • KT-47301 [Commonizer] Associative commonization

Tools. Compiler Plugins

  • KT-46723 Kotlin Lombok: JPS: config file is searched in directory relative to compiler daemon
  • KT-46739 @SerialInfo NPE with default parameter

Tools. Gradle

  • KT-13258 Kotlin compiler doesn't respect Gradle's "sourceCompatibility" and "targetCompatibility"
  • KT-43095 Add support for Java Toolchain to the Gradle plugin
  • KT-45611 KGP should declare JDK version as input
  • KT-47185 Migrate Gradle Integration tests to ...
Read more

Kotlin 1.5.21

13 Jul 11:40

Choose a tag to compare

Changelog

Compiler

  • KT-47320 "StringConcatException: Mismatched number of concat arguments" String concatenation fails when template contains special character
  • KT-47445 "definitely not null type parameters is only available since language version 1.6" error in cast expression
  • KT-47446 Improve warning message INTEGER_OPERATOR_RESOLVE_WILL_CHANGE
  • KT-47447 False positive INTEGER_OPERATOR_RESOLVE_WILL_CHANGE warning: "expression will be resolved to Int in future releases"
  • KT-47449 JVM / IR: ClassCastException IrStarProjectionImpl cannot be cast to IrTypeProjection
  • KT-47459 "IndexOutOfBoundsException: Index 0 out of bounds for length 0" caused by MarkertManager dependency
  • KT-47480 StackOverflowError: Recursion on erasion of raw type with interdependent type parameters

Tools. Compiler Plugins

  • KT-47161 Serializable class can't be inherited from serializable class in other module with: e: org.jetbrains.kotlin.codegen.CompilationException: Back-end (JVM) Internal error: Couldn't transform method node: write$Self
  • KT-47455 Kotlin lombok plugin NullPointerException
  • KT-47513 Lombok compiler plugin failed with 'Recursion detected in a lazy value under LockBasedStorageManager@1c21db60 (TopDownAnalyzer for JVM)'

Tools. Gradle

  • KT-47444 Gradle Plugin: Publishing project with "maven-publish" fails when dependency versions are omitted (NPE in MppDependencyRewritingUtilsKt.associateDependenciesWithActualModuleDependencies)

Tools. kapt

  • KT-47416 Kapt Gradle DSL ignores javaCompilerOptions in 1.5.20

Checksums

File Sha256
kotlin-compiler-1.5.21.zip f3313afdd6abf1b8c75c6292f4e41f2dbafefc8f6c72762c7ba9b3daeef5da59
kotlin-native-linux-1.5.21.tar.gz 63330f898f307cb2330ef04a5d36ac4cd29128912a2d9a93b8cde5b7b99ec96f
kotlin-native-macos-1.5.21.tar.gz 3bf60142e04094112c64ca31d6f3a7382adf210bb222c8b03579bed0d3ff5611
kotlin-native-windows-1.5.21.zip e22212e58a39066ae976a45a8bc877cd2e2018fb9adc321b957779b38561c064

Kotlin 1.5.20

24 Jun 13:20

Choose a tag to compare

How to update to a new release

Changelog

Compiler

New Features

  • KT-43262 No error for Java generic class @NotNull type parameter used in Kotlin with nullable type argument
  • KT-44373 FIR: support error / warning suppression
  • KT-45189 Support nullability annotations at module level
  • KT-45284 Emit warnings based on jspecify annotations
  • KT-45525 Allow to omit JvmInline annotation for expect value classes
  • KT-46545 Emit annotations on function type parameters into bytecode for -jvm-target 1.8 and above

Performance Improvements

  • KT-36646 Don't box primitive values in equality comparison with objects in JVM_IR

Fixes

  • KT-8325 Unresolved annotation should be an error
  • KT-19455 Type annotation unresolved on a type parameter of a supertype in anonymous object expression
  • KT-24643 Prohibit using a type parameter declared for an extension property inside delegate
  • KT-25876 Annotations on return types and supertypes are not analyzed
  • KT-28449 Annotation target is not analyzed in several cases for type annotations
  • KT-36770 Prohibit unsafe calls with expected @NotNull T and given Kotlin generic parameter with nullable bound
  • KT-36880 K/N IR: Reference to expect property in actual declaration is not remapped
  • KT-38325 IllegalStateException: No parameter with index 0-0 when iterating Scala 2.12.11 List
  • KT-38342 FIR: Consider renaming diagnostic from AMBIGUITY to OVERLOAD_RESOLUTION_AMBIGUITY
  • KT-38476 [FIR] Forgotten type approximation
  • KT-38540 Kotlin/Native Set.contains fails with specific enum setup
  • KT-40425 IrGenerationExtension. Support simple reporting to compiler output (for development/debug)
  • KT-41620 ClassCastException: Class cannot be cast to java.lang.Void
  • KT-41679 NI: TYPE_MISMATCH wrong type inference of collection with type Any and integer literal
  • KT-41818 NI: False positive IMPLICIT_NOTHING_TYPE_ARGUMENT_IN_RETURN_POSITION leads to NothingValueException on delegated properties
  • KT-42239 IR: Report compilation error instead of throwing an exception (effectively crash compiler) when some declaration wasn't found while deserialization
  • KT-42631 ArrayIndexOutOfBoundsException was thrown during IR lowering
  • KT-43258 NI: False positive "Suspend function 'invoke' should be called only from a coroutine or another suspend function" when calling suspend operator fun on object property from last expression of a crossinlined suspend lambda
  • KT-44036 Enum initialization order
  • KT-44511 FIR DFA: smartcast after if (nullable ?: boolean)
  • KT-44554 RAW FIR: NPE in RawFirBuilder
  • KT-44682 raw FIR: incorrect source for qualified access
  • KT-44695 *_TYPE_MISMATCH_ON_OVERRIDE checkers do not work for anonymous objects
  • KT-44699 FIR: incorrect lambda return type (led to a false alarm: PROPERTY_TYPE_MISMATCH_ON_OVERRIDE)
  • KT-44802 FIR bootstrap: trying to access package private class
  • KT-44813 FIR bootstrap: various errors in collection-like classes
  • KT-44814 FIR bootstrap: incorrect cast in when branch
  • KT-44942 [FIR] ClassCastException in boostrap tests
  • KT-44995 FIR: false positive for ANNOTATION_ARGUMENT_MUST_BE_CONST
  • KT-45010 FIR: lambda arguments of inapplicable call is not resolved
  • KT-45048 FIR bootstrap: VerifyError on KtUltraLightClass
  • KT-45052 FIR bootstrap: inapplicable candidate in GenerateSpecTests.kt
  • KT-45121 FIR IDE: redundant vararg parameter type transformation
  • KT-45136 Native: dividing Int.MIN_VALUE by -1 crashes or hangs
  • KT-45236 JVM / IR: "IllegalStateException: Symbol with IrTypeParameterSymbolImpl is unbound" caused by contracts and sealed class
  • KT-45308 Psi2ir: "AssertionError: TypeAliasDescriptor expected" caused by using typealias from one module as a type in another module without a transitive dependency
  • KT-45316 [FIR] Ambiguity between two implicit invokes with receiver
  • KT-45344 FIR: Wrong inferred type for nullable type parameter
  • KT-45385 FIR: false positive MUST_BE_INITIALIZED_OR_BE_ABSTRACT after rethrow
  • KT-45475 [FIR] No smartcast after throw in if inside try block
  • KT-45508 False negative ABSTRACT_CLASS_MEMBER_NOT_IMPLEMENTED on a fake override with an abstract super class member
  • KT-45578 REPL: Unresolved imports are cached for the subsequent compilations
  • KT-45685 JVM IR: capturing a variable into crossinline suspend lambda makes the function inside inline function no longer unbox Result
  • KT-45584 [FIR] Fix overriding property and java function in java class
  • KT-45697 JVM IR: ISE "Function has no body" on getter of private field in a class present both in sources and dependencies
  • KT-45842 Compiler doesn't allow a shared class to inherit a platform-specific sealed class
  • KT-45848 False negative [SEALED_INHERITOR_IN_DIFFERENT_MODULE] error in compiler for a platform-specific inheritor of a shared sealed class
  • KT-45931 There is no warning based on nullability java annotation
  • KT-45998 JVM IR: AE when an accessor to a protected companion object member is being generated in child class
  • KT-46048 Enum entries init order in companion object
  • KT-46074 FIR: private-in-file fun interface is considered invisible in this file
  • KT-46173 No error reporting on annotations on target type of as expression in return
  • KT-46235 JVM IR: Stack overflow error on large expressions
  • KT-46270 [FIR] Support @PublishedAPI in inline checker
  • KT-46539 Generate annotations on type parameters bounds in bytecode
  • KT-46578 JVM IR: IllegalAccessError accessing property delegated to java super class protected field reference
  • KT-46597 JVM IR: AssertionError: SyntheticAccessorLowering should not attempt to modify other files - crossinline accessor
  • KT-46601 JVM / IR: IllegalStateException: "Can't find method 'invokeinvoke`" when default lambda takes inline class parameters
  • KT-46670 StackOverflowError on inheritance from raw type where class has protobuf-like recursive generics
  • KT-46715 JVM / IR: "AssertionError: Unbound symbols not allowed IrConstructorSymbolImpl" with enum classes with the same name in test and src folders
  • KT-46759 JVM IR: CCE in LateinitUsageLowering on @JvmStatic lateinit property in object
  • KT-46777 [Native] [IR] Support suspend function as super type
  • KT-46802 JVM / IR: "UnsupportedOperationException: Unknown structure of ADAPTER_F...
Read more

Kotlin 1.5.20-RC

10 Jun 15:25

Choose a tag to compare

Kotlin 1.5.20-RC Pre-release
Pre-release

Changelog

Backend. IR

  • KT-42239 IR: Report compilation error instead of throwing an exception (effectively crash compiler) when some declaration wasn't found while deserialization

Compiler

New Features

  • KT-44373 FIR: support error / warning suppression

Fixes

  • KT-38342 FIR: Consider renaming diagnostic from AMBIGUITY to OVERLOAD_RESOLUTION_AMBIGUITY
  • KT-38476 [FIR] Forgotten type approximation
  • KT-44682 raw FIR: incorrect source for qualified access
  • KT-44813 FIR bootstrap: various errors in collection-like classes
  • KT-45508 False negative ABSTRACT_CLASS_MEMBER_NOT_IMPLEMENTED on a fake override with an abstract super class member
  • KT-45578 REPL: Unresolved imports are cached for the subsequent compilations
  • KT-45685 JVM IR: capturing a variable into crossinline suspend lambda makes the function inside inline function no longer unbox Result
  • KT-46235 JVM IR: Stack overflow error on large expressions
  • KT-46578 JVM IR: IllegalAccessError accessing property delegated to java super class protected field reference
  • KT-46597 JVM IR: AssertionError: SyntheticAccessorLowering should not attempt to modify other files - crossinline accessor
  • KT-46601 JVM / IR: IllegalStateException: "Can't find method 'invokeinvoke`" when default lambda takes inline class parameters
  • KT-46759 JVM IR: CCE in LateinitUsageLowering on @JvmStatic lateinit property in object
  • KT-46777 [Native] [IR] Support suspend function as super type
  • KT-46802 JVM / IR: "UnsupportedOperationException: Unknown structure of ADAPTER_FOR_CALLABLE_REFERENCE" caused by function reference on @JvmStatic function with unused default parameters
  • KT-46813 JVM / IR: "ClassCastException: Integer cannot be cast to class Result" with Flow and fold method
  • KT-46822 JVM IR: StackOverflowError on compiling a large data class
  • KT-46837 Backend Internal error: Exception during IR lowering: assert at IrOverridingUtilKt.buildFakeOverrideMember
  • KT-46921 JVM / IR: "IndexOutOfBoundsException: Cannot pop operand off an empty stack" caused by crossinline parameter and label return

Docs & Examples

  • KT-33783 Document when a range created with rangeTo is empty

IDE

  • KT-44825 Can't open Kotlin compiler settings in newly created project

IDE. Gradle Integration

  • KT-45277 Wrong jvm target in gradle module in IDEA

IDE. Native

  • KT-39320 [Commonizer] Reduce memory consumption

JavaScript

  • KT-44394 KJS / IR: null companion object for existed stdlib interfaces NodeFilter and SVGUnitTypes
  • KT-45361 KJS / IR: IrConstructorCall representing annotation always returns Unit
  • KT-46859 Exception during IR lowering: NullPointerException was thrown at: optimizations.FoldConstantLowering.tryFoldingUnaryOps

Libraries

  • KT-46002 Support all Unicode digit chars in digitToInt (JS and Native)
  • KT-46184 Equivalize isLowerCase and isUpperCase behavior in all platforms

Middle-end. IR

  • KT-40425 IrGenerationExtension. Support simple reporting to compiler output (for development/debug)
  • KT-45308 Psi2ir: "AssertionError: TypeAliasDescriptor expected" caused by using typealias from one module as a type in another module without a transitive dependency

Native. ObjC Export

  • KT-38600 Kotlin MP iOS Target doesn't contain kdoc comments

Reflection

  • KT-10838 Provide sensible toString() for property accessors in reflection

Tools. CLI

  • KT-14772 ISE (FNFE "Not a directory") on compilation with destination argument clashing with an existing file which is not a directory
  • KT-18184 CompileEnvironmentException: Invalid jar path on "-d" with .jar in non-existing directory
  • KT-40977 Report a readable diagnostic on empty -J argument in CLI

Tools. Compiler Plugins

  • KT-45538 Serialization, JVM IR: "AssertionError: No such type argument slot in IrConstructorCallImpl" with inner classes
  • KT-46469 Kotlin Lombok: accessors with AccessLevel.MODULE fail to resolve
  • KT-46529 Kotlin Lombok: with @Accessors without explicit prefix the prefix from lombok.config is not taken into account
  • KT-46531 Kotlin Lombok: lombok.getter.noIsPrefix is processed depending on character case

Tools. Gradle

  • KT-24533 Kapt should not run when annotation processors are not configured
  • KT-46401 Deprecate 'kotlin.parallel.tasks.in.project' build property
  • KT-46820 Gradle: kotlinc (1.5.0) race condition causes a NullPointerException

Tools. Gradle. JS

  • KT-46976 KJS: Broken support for dynamically created webpack.config.d

Tools. Gradle. Multiplatform

  • KT-46394 Multiplatform: Gradle 7 support
  • KT-46517 Add kotlin-project-model as api dependency to kotlin-gradle-plugin-api

Tools. Gradle. Native

  • KT-46680 Register concrete "embedAndSign" tasks instead umbrella
  • KT-46892 Kotlin Multiplatform Gradle Plugin: EmbedAndSign task always contains a default framework name

Tools. kapt

  • KT-31146 kapt: executableElement.getAnnotation(JvmOverloads::class.java) returns null
  • KT-35167 Kapt Gradle plugin doesn't handle --module-path javac argument
  • KT-41581 Kapt doesn't have line breaks between warnings

Checksums

File Sha256
kotlin-compiler-1.5.20-RC.zip 3537d9e9c57f4afc4e8359f695da98f631319464ba1330c70b1b4aca5d30b84e
kotlin-native-linux-1.5.20-RC.tar.gz d84ea3f3187aaeb21cceb5402cc74951a7a737799ce68a701f58b76e5ef534a0
kotlin-native-macos-1.5.20-RC.tar.gz b97b9cadb3791905dc15c090f3981dcb8a6eb4d31cf3721763070e12009d4b8e
kotlin-native-windows-1.5.20-RC.zip c4ba183f211652881434ce4b41bde87b626d319134f5163bb8c295c186f3e1d5

Kotlin 1.5.20-M1

26 May 15:24

Choose a tag to compare

Kotlin 1.5.20-M1 Pre-release
Pre-release

Changelog

Compiler

New Features

  • KT-45189 Support nullability annotations at module level
  • KT-45525 Allow to omit JvmInline annotation for expect value classes
  • KT-46545 Emit annotations on function type parameters into bytecode for -jvm-target 1.8 and above

Performance Improvements

  • KT-36646 Don't box primitive values in equality comparison with objects in JVM_IR

Fixes

  • KT-8325 Unresolved annotation should be an error
  • KT-19455 Type annotation unresolved on a type parameter of a supertype in anonymous object expression
  • KT-24643 Prohibit using a type parameter declared for an extension property inside delegate
  • KT-25876 Annotations on return types and supertypes are not analyzed
  • KT-28449 Annotation target is not analyzed in several cases for type annotations
  • KT-36770 Prohibit unsafe calls with expected @NotNull T and given Kotlin generic parameter with nullable bound
  • KT-38325 IllegalStateException: No parameter with index 0-0 when iterating Scala 2.12.11 List
  • KT-38540 Kotlin/Native Set.contains fails with specific enum setup
  • KT-41620 ClassCastException: Class cannot be cast to java.lang.Void
  • KT-41679 NI: TYPE_MISMATCH wrong type inference of collection with type Any and integer literal
  • KT-41818 NI: False positive IMPLICIT_NOTHING_TYPE_ARGUMENT_IN_RETURN_POSITION leads to NothingValueException on delegated properties
  • KT-42631 ArrayIndexOutOfBoundsException was thrown during IR lowering
  • KT-43258 NI: False positive "Suspend function 'invoke' should be called only from a coroutine or another suspend function" when calling suspend operator fun on object property from last expression of a crossinlined suspend lambda
  • KT-44036 Enum initialization order
  • KT-44511 FIR DFA: smartcast after if (nullable ?: boolean)
  • KT-44554 RAW FIR: NPE in RawFirBuilder
  • KT-44695 *_TYPE_MISMATCH_ON_OVERRIDE checkers do not work for anonymous objects
  • KT-44699 FIR: incorrect lambda return type (led to a false alarm: PROPERTY_TYPE_MISMATCH_ON_OVERRIDE)
  • KT-44802 FIR bootstrap: trying to access package private class
  • KT-44814 FIR bootstrap: incorrect cast in when branch
  • KT-44942 [FIR] ClassCastException in boostrap tests
  • KT-44995 FIR: false positive for ANNOTATION_ARGUMENT_MUST_BE_CONST
  • KT-45010 FIR: lambda arguments of inapplicable call is not resolved
  • KT-45048 FIR bootstrap: VerifyError on KtUltraLightClass
  • KT-45052 FIR bootstrap: inapplicable candidate in GenerateSpecTests.kt
  • KT-45121 FIR IDE: redundant vararg parameter type transformation
  • KT-45136 Native: dividing Int.MIN_VALUE by -1 crashes or hangs
  • KT-45316 [FIR] Ambiguity between two implicit invokes with receiver
  • KT-45344 FIR: Wrong inferred type for nullable type parameter
  • KT-45475 [FIR] No smartcast after throw in if inside try block
  • KT-45584 [FIR] Fix overriding property and java function in java class
  • KT-45697 JVM IR: ISE "Function has no body" on getter of private field in a class present both in sources and dependencies
  • KT-45842 Compiler doesn't allow a shared class to inherit a platform-specific sealed class
  • KT-45848 False negative [SEALED_INHERITOR_IN_DIFFERENT_MODULE] error in compiler for a platform-specific inheritor of a shared sealed class
  • KT-46048 Enum entries init order in companion object
  • KT-46074 FIR: private-in-file fun interface is considered invisible in this file
  • KT-46173 No error reporting on annotations on target type of as expression in return
  • KT-46270 [FIR] Support @PublishedAPI in inline checker
  • KT-46539 Generate annotations on type parameters bounds in bytecode
  • KT-46670 StackOverflowError on inheritance from raw type where class has protobuf-like recursive generics
  • KT-46715 JVM / IR: "AssertionError: Unbound symbols not allowed IrConstructorSymbolImpl" with enum classes with the same name in test and src folders

IDE

  • KT-44638 clone() call is unresolved in JVM module of a multiplatform project
  • KT-45629 [ULC] KtUltraLightFieldForSourceDeclaration.nameIdentifier returns null
  • KT-45908 Reproduciable 'org.jetbrains.kotlin.idea.caches.resolve.KotlinIdeaResolutionException: Kotlin resolution encountered a problem while analyzing KtNameReferenceExpression'

IDE. FIR

  • KT-45175 FIR IDE: Exception with local property in init block
  • KT-45199 FIR IDE: Error while collecting diagnostic on stale element after replacing element in quickfix
  • KT-45312 FIR IDE: FIR plugin throws exception on synthetic function

IDE. Gradle Integration

  • KT-34401 KotlinGradleModelBuilder builds models for non-kotlin modules and always trigger full task configuration.
  • KT-46488 Import of a multiplatform project with MPP module depending on Kotlin/JVM one fails

IDE. Inspections and Intentions

  • KT-45075 Inspection: Redundant creation of Json format
  • KT-45347 Sealed interfaces: quickfix to move to package/module of sealed class/interface should not be shown in case of read-only declaration
  • KT-45348 Sealed interfaces: show error for usage of sealed class/interface from a library in Java source code
  • KT-46063 In multiplatform code, suggest to generate remaining when branches at least for shared sealed classes

IDE. Refactorings

  • KT-44431 Quickfix to move class/interface to proper location: it is allowed to choose test source in JPS project while compiler does not allow it

JavaScript

  • KT-40235 KJS: IR. Broken support for external interface companion
  • KT-40689 KJS / IR: strange and slow code for kotlin.math.max and kotlin.math.min for Double
  • KT-44138 KJS / IR: Constant folding works incorrectly with unsigned arithmetics
  • KT-44950 KJS / IR: "IllegalStateException: Can't find name for declaration" in case of extending export declared class without @JsExport annotation
  • KT-45057 KJS / IR: "ClassCastException" when using js function in init block
  • KT-45655 KJS: "REINTERPRET_CAST" is not copyable
  • KT-45866 Default parameter with generic in expect-actual declarations

Libraries

  • KT-43701 Stdlib: Expand KDoc of inc() and dec() for operators

Middle-end. IR

  • KT-36880 K/N IR: Reference to expect property in actual declaration is not remapped
  • KT-45236 JVM / IR: "IllegalStateException: Symbol with IrTypeParameterSymbolImpl is unbound" caused by contracts and sealed class

Native

  • KT-33175 IR: String constants with incorrect surrogate pairs aren't preserved du...
Read more