Skip to content

Releases: JetBrains/kotlin

Kotlin 1.4-M2

04 Jun 08:00

Choose a tag to compare

Kotlin 1.4-M2 Pre-release
Pre-release

Contents

The release contents the JVM version of the Kotlin compiler, and also the Kotlin/Native compiler for the supported platforms: Linux, macOS and Windows.

Changelog

Compiler

New Features

  • KT-37432 Do not include annotations fields into 'visibility must be explicitly specified' check in api mode

Performance Improvements

  • KT-27362 Anonymous classes representing function/property references contain rarely used methods
  • KT-35626 NI: Performance problem with many type parameters
  • KT-36047 Compiler produces if-chain instead of switch when when subject captured as variable
  • KT-36638 Use 'java/lang/StringBuilder.append (C)Ljava/lang/StringBuilder;' when appending single character in JVM_IR
  • KT-37389 Avoid type approximation during generation constraints with EQUALITY kind
  • KT-37392 Avoid substitution and type approximation for simple calls
  • KT-37546 NI: high memory and CPU consumption due to creating useless captured types (storing in approximated types cache, unneeded computations)

Fixes

  • KT-11265 Factory pattern and overload resolution ambiguity
  • KT-27524 Inline class is boxed when used with suspend modifier
  • KT-27586 ClassCastException occurs if the Result (or any other inline class) is returned from a lambda
  • KT-30419 Use boxed version of an inline class in return type position for covariant and generic-specialized overrides
  • KT-31163 FIR: consider replacing comparisons with compareTo calls and some additional intrinsics
  • KT-31585 ClassCastException with derived class delegated to generic class with inline class type argument
  • KT-31823 NI: Type mismatch with a star projection and UnsafeVariance
  • KT-33119 Pre-increment for inline class wrapping Int compiles to direct increment instead of inc-impl
  • KT-33715 Kotlin/Native: metadata compiler
  • KT-34048 IllegalAccessError when initializing val property in EXACTLY_ONCE lambda
  • KT-34433 NI: Type mismatch with a star projection and UnsafeVariance
  • KT-35133 FIR Java: don't set 'isOperator' for methods with non-operator names
  • KT-35234 ClassCastException with creating an inline class from a function reference of covariant or generic-specialized override
  • KT-35406 Generic type implicitly inferred as Nothing with no warning
  • KT-35587 Plain namespace strings in JvmNameResolver.PREDEFINED_STRINGS are prone to namespace changes during jar relocation.
  • KT-36044 NI: premature fixation a type variable if there were nested lambdas (constraint source was the deepest lambda)
  • KT-36057 [FIR] Incorrect smartcast
  • KT-36069 NI: TYPE_MISMATCH caused by incorrect inference to Nothing
  • KT-36125 Callable reference resolution ambiguity error is not displayed properly in the IDE
  • KT-36191 IDE locks loading packages and editing file containing try keyword inside string template
  • KT-36222 NI: Improve error message about nullability mismatch for a generic call
  • KT-36249 NI doesn't use upper bound for T of called function during infer return type and as a result infer it to Any? if the resulting type was intersection type
  • KT-36345 FIR: record argument mapping for use in back-end
  • KT-36446 NI: "UnsupportedOperationException no descriptor for type constructor of IntegerLiteralType[Int,Long,Byte,Short]" with BuilderInference and delegate
  • KT-36758 [FIR] Unresolved callable reference to member of local class
  • KT-36759 [FIR] Unsupported callable reference resolution for methods with default parameters
  • KT-36762 [FIR] Unresolved array.clone()
  • KT-36764 [FIR] Bug in inference with DefinitelyNotNull types
  • KT-36816 NI: definitely not-null (T!!) types in invariant positions don't approximate to T inside inference process
  • KT-36819 NI: premature completion of lambdas, which are passed somewhere
  • KT-36850 Incorrect private visibility of sealed class constructors
  • KT-36856 Throwing exception when there is inheritance in Kotlin from Java class, which contains methods with the same JVM descriptors
  • KT-36879 Introduce FIR_IDENTICAL in diagnostic tests
  • KT-36881 FIR: completion don't runs for return expressions
  • KT-36887 [FIR] Unresolved member in nested lambda in initializer
  • KT-36905 [FIR] Unresolved in lambda in default argument position
  • KT-36953 AssertionError: "Unsigned type expected: null" when there is a range with an unsigned type
  • KT-37009 FIR: Bound smart-cast lost
  • KT-37027 FIR: Wrong projection on spread + varargs on non-final types
  • KT-37038 NI: redundant lambda's arrow breaks CST calculation for extension lambdas
  • KT-37043 NI: inference T to Any? if there was elvis between Java out-type and reified materialize for this type without out projection
  • KT-37066 [FIR] Wrong type inference for lambdas
  • KT-37070 [FIR] Unresolved parameters of outer lambda in scope of inner lambda
  • KT-37087 "IllegalStateException: Can't find method 'invoke()'" for mutable property reference in default value of an inline function parameter
  • KT-37091 [FIR] Wrong inferred type of when-expression if when-argument is not-null-asserted and type is not specifies explicitly
  • KT-37176 [FIR] Incorrect resolution mode for statements of block
  • KT-37302 Unexpected conversion:Int constant inferred to Long in when expression
  • KT-37327 FIR: Smartcast problem
  • KT-37343 NI: definitely not null types pre-approximation is inconsistent with OI
  • KT-37380 NI: broken some code with def not null types due to skip needed constraints
  • KT-37419 NI: UNRESOLVED_REFERENCE_WRONG_RECEIVER is reported in case lambda with receiver is returned from when expression
  • KT-37434 Kotlin/JS, Kotlin/Native: fun interfaces: SAM conversion to Kotlin interface is not compiled with RESOLUTION_TO_CLASSIFIER
  • KT-37447 Expression from annotation entry in value parameter inside value parameter should be marked as USED_AS_EXPRESSION
  • KT-37453 Type arguments not checked to be empty for candidates with no declared parameters
  • KT-37488 [FIR] Incorrect exhaustiveness checking for branches with equals to object that implements sealed class
  • KT-37497 NI: 'super' is not an expression, it can not be used as a receiver for extension functions
  • KT-37530 NI: instantiation of abstract class via callable reference argument causes run time InstantiationError
  • KT-37531 NI: callable reference argument with left hand side type parameter causes frontend exception
  • KT-37554 NI: Nothing is inferred incorrectly with elvis return
  • KT-37579 NI: inconsistent behaviour with OI around implic...
Read more

Kotlin 1.3.72

15 Apr 09:10

Choose a tag to compare

1.3.72

Compiler

  • KT-37107 kotlinc allows calling default constructor of class with no constructors
  • KT-37406 NI: "UnsupportedOperationException: no descriptor for type constructor of TypeVariable(T)" when compiling *.gradle.kts file

IDE

  • KT-37483 Kotlin localisation
  • KT-37629 False positive "Unsupported [literal prefixes and suffixes]" for infix function
  • KT-37808 "Resolve pasted references" dialog freezes UI for 20 seconds when pasting kotlin code

IDE. Completion

  • KT-37144 Completion goes into an infinite loop with Arrow 0.10.4 dependency

IDE. Debugger

  • KT-37767 Debugger, NPE happens while stepping.

IDE. Editing

  • KT-35135 UI freeze: not enough checkCancelled on resolve path

IDE. Inspections and Intentions

  • KT-37217 Replace UseExperimental with OptIn intention removes target prefixes for annotations

IDE. Native

  • KT-38079 IDEA navigates to wrong line of source code from Native stack trace

IDE. Navigation

  • KT-37487 Destructuring declarations are called "destruction declarations" in UI

Tools. Gradle. Native

  • KT-37696 MPP Gradle plugin: False positive parallel execution detection if build started with --continue

Kotlin 1.3.71

23 Mar 15:33

Choose a tag to compare

1.3.71

Compiler

  • KT-36095 201: False positive OVERLOAD_RESOLUTION_AMBIGUITY with Java Enum.valueOf and Enum.values() reference
  • KT-37040 'No explicit visibility in API mode' should not be reported on enum members
  • KT-37204 AssertionError: "No delegated property metadata owner for" with lazy inside inline function

Docs & Examples

  • KT-37029 Kotlin full stack app demo: update all involving versions to work with 1.3.70 release

IDE

  • KT-34759 "PSI and index do not match" and high CPU usage when the library has enum with elements in quotes and internal lazy val in another part of code
  • KT-37200 StackOverflowError in LightMethodBuilder.equals when analysing Kotlin files
  • KT-37229 java.lang.NoSuchMethodError: 'com.intellij.psi.impl.light.LightJavaModule, com.intellij.psi.impl.light.LightJavaModule.findModule after updating kotlin plugin to 1.3.70
  • KT-37273 No error in editor when typing unresolved reference in super constructor lambda
  • KT-37414 Not all imports are added on paste if code is formatted after paste
  • KT-37553 Run inspections after general highlight pass

IDE. Code Style, Formatting

  • KT-37545 Continuation indent for method's parameter changes in call chain

IDE. Hints

  • KT-37537 IDE is missing or swallowing keystrokes when hint popups are displayed

IDE. Inspections and Intentions

  • KT-36478 IDE suggests to use 'OptIn' annotation when it is not available in the used version of kotlin-stdlib
  • KT-37294 False positive "Unused unary operator" on negative long annotation value

IDE. Navigation

  • KT-36657 KotlinFindUsagesHandler#processElementUsages always return false if options.isSearchForTextOccurrences is false

IDE. Refactorings

  • KT-37451 Change of signature error: Type of parameter cannot be resolved
  • KT-37597 Support Suggest rename and change signature refactorings in Kotlin for IDEA 2020.1

IDE. Run Configurations

  • KT-36781 Override ConfigurationFactory::getId method in Kotlin plugin to avoid problems with localizations

JavaScript

  • KT-37386 Incorrect JS generated by the compiler: function is erased by the function parameter

Tools. Gradle. JS

  • KT-36196 Investigate performance problems while resolving in projects with npm dependencies

Tools. Gradle. Multiplatform

  • KT-37264 In intermediate common source sets, internals are not visible from their dependsOn source sets during Gradle build

Tools. Gradle. Native

  • KT-37565 MPP plugin: Forbid parallel in-process execution of the Kotlin/Native compiler

Tools. kapt

  • KT-37241 Kapt: Classpath entry points to a non-existent location: ...build/intermediates/javac/debug/classes...

Kotlin 1.4-M1

23 Mar 11:18

Choose a tag to compare

Kotlin 1.4-M1 Pre-release
Pre-release

Contents

The release contents the JVM version of the Kotlin compiler, and also the Kotlin/Native compiler for the supported platforms: Linux, macOS and Windows.

Changelog

Compiler

New Features

  • KT-4240 Type inference possible improvements: analyze lambda with expected type from the outer call
  • KT-7304 Smart-casts and generic calls with multiple bounds on type parameters
  • KT-7745 Support named arguments in their own position even if the result appears as mixed
  • KT-7770 SAM for Kotlin classes
  • KT-8834 Support function references with default values as other function types
  • KT-10930 Expected type isn't taken into account for delegated properties
  • KT-11723 Support coercion to Unit in callable reference resolution
  • KT-14416 Support of @PolymorphicSignature in Kotlin compiler
  • KT-16873 Support COERSION_TO_UNIT for suspend lambdas
  • KT-17643 Inferring type of Pair based on known Map type
  • KT-19869 Support function references to functions with vararg if expected type ends with repeated vararg element type
  • KT-21178 Prohibit access of protected members inside public inline members
  • KT-21368 Improve type inference
  • KT-25866 Iterable.forEach does not accept functions that return non-Unit values
  • KT-26165 Support VarHandle in JVM codegen
  • KT-27582 Allow contracts on final non-override members
  • KT-28298 Allow references to generic (reified) type parameters in contracts
  • KT-31230 Refine rules for allowed Array-based class literals on different platforms: allow Array::class everywhere, disallow Array<...>::class on non-JVM
  • KT-31244 Choose Java field during overload resolution with a pure Kotlin property
  • KT-31734 Empty parameter list required on Annotations of function types
  • KT-33990 Type argument isn't checked during resolution part
  • KT-33413 Allow 'break' and 'continue' in 'when' statement to point to innermost surrounding loop
  • KT-34743 Support trailing comma in the compiler
  • KT-34847 Lift restrictions from kotlin.Result

Fixes

  • KT-2869 Incorrect resolve with 'unsafe call error' and generics
  • KT-3630 Extension property (generic function type) does not work
  • KT-3668 Infer type parameters for extension 'get' in delegated property
  • KT-3850 Receiver check fails when type parameter has another parameter as a bound
  • KT-3884 Generic candidate with contradiction is preferred over matching global function
  • KT-4625 Poor error highlighting when assigning not matched type to index operator
  • KT-5449 Wrong resolve when functions differ only in the nullability of generic type
  • KT-5606 "Type mismatch" in Java constructor call with SAM lambda and vararg parameter
  • KT-6005 Type inference problem in sam constructors
  • KT-6591 Overloaded generic extension function call with null argument resolved incorrectly
  • KT-6812 Type inference fails when passing a null instead of a generic type
  • KT-7298 Bogus type inference error in generic method call translated from Java
  • KT-7301 Type inference error in Kotlin code translated from Java
  • KT-7333 Type inference fails with star-projections in code translated from Java
  • KT-7363 Kotlin code with star-projections translated from Java does not typecheck
  • KT-7378 3-dimension array type inference fail
  • KT-7410 Call resolution error appears only after adding non-applicable overload
  • KT-7420 Type inference sometimes infers less specific type than in Java
  • KT-7758 Type of lambda can't be infered
  • KT-8218 Wrong 'equals' for generic types with platform type and error type
  • KT-8265 Non-typesafe program is compiled without errors
  • KT-8637 Useless diagnostics for type parameters with unsafe nullability
  • KT-8966 Smart casts don't work with implicit receiver and extension on type parameter with bounds
  • KT-10265 Type inference problem when using sealed class and interfaces
  • KT-10364 Call completeCall on variable before invoke resolution
  • KT-10612 java.util.Comparator.comparing type inference
  • KT-10628 Wrong type mismatch with star projection of inner class inside use-site projected type
  • KT-10662 Smartcast with not-null assertion
  • KT-10681 Explicit type arguments not taken into account when determining applicable overloads of a generic function
  • KT-10755 Not "least" common super-type is selected for nested 'if' result in presence of multiple inheritance
  • KT-10929 Type inference based on receiver type doesn't work for delegated properties in some cases
  • KT-10962 Wrong resolution when argument has unstable DataFlowValue
  • KT-11108 RxJava failed platform type inference
  • KT-11137 Java synthetic property does not function for a type with projection
  • KT-11144 UninferredParameterTypeConstructor exception during build
  • KT-11184 Type inference failed for combination of safe-call, elvis, HashSet and emptySet
  • KT-11218 Type inference incorrectly infers nullable type for type parameter
  • KT-11323 Type inference failed in call with lambda returning emptyList
  • KT-11331 Unexpected "Type inference failed" in SAM-conversion to projected type
  • KT-11444 Type inference fails
  • KT-11664 Disfunctional inference with nullable type parameters
  • KT-11894 Type substitution bug related platform types
  • KT-11897 No error REIFIED_TYPE_FORBIDDEN_SUBSTITUTION on captured type
  • KT-11898 Type inference error related to captured types
  • KT-12036 Type inference failed
  • KT-12038 non-null checks and inference
  • KT-12190 Type inference for TreeMap type parameters from expected type doesn't work when passing comparator.
  • KT-12684 A problem with reified type-parameters and smart-casts
  • KT-12833 'it' does not work in typed containers of lambdas
  • KT-13002 "Error type encountered: UninferredParameterTypeConstructor" with elvis and when
  • KT-13028 cast with star on on type with contravariant generic parameter makes the compiler crash
  • KT-13339 Type inference failed for synthetic Java property call on implicit smart cast receiver
  • KT-13398 "Type T is not a subtype of Any"
  • KT-13683 Type infer...
Read more

Kotlin 1.3.70

03 Mar 17:04

Choose a tag to compare

Contents

The release contents the JVM version of the Kotlin compiler, and also the Kotlin/Native compiler for the supported platforms: Linux, macOS and Windows.

Changelog

Compiler

New Features

  • KT-34648 Support custom messages for @RequiresOptIn-marked annotations

Performance Improvements

  • KT-14513 Suboptimal compilation of lazy delegated properties with inline getValue

Fixes

  • KT-19234 Improve "Supertypes of the following classes cannot be resolved" diagnostic
  • KT-21178 Prohibit access of protected members inside public inline members
  • KT-24461 Expect interface with suspend function with default arguments causes runtime error
  • KT-25514 Support usage of function reference with vararg where function of array is expected in new inference
  • KT-26435 Bad frame merge after inline
  • KT-27825 Gradually prohibit non-abstract classes containing abstract members invisible from that classes (internal/package-private)
  • KT-27999 Generic type is fixed too early for lambda arguments
  • KT-28940 Concurrency issue for lazy values with the post-computation phase
  • KT-29242 Conditional with generic type Nothing inside inline function throws java.lang.VerifyError: Bad return type
  • KT-30244 Unable to infer common return type for two postponed arguments
  • KT-30245 Wrong type is inferred for lambda if it has expected type with an extension receiver
  • KT-30277 Relax the "no reflection found in class path" warning for KType and related API
  • KT-30744 Invoking Interface Static Method from Extension method generates incorrect jvm bytecode
  • KT-30953 Missing unresolved if callable reference is used in the place in which common super type is computing
  • KT-31227 Prohibit using array based on non-reified type parameters as reified type arguments on JVM
  • KT-31242 "Can't find enclosing method" proguard compilation exception with inline and crossinline
  • KT-31411 Support mode of compiler where it analyses source-set as platform one, but produces only metadata for that specific source-set
  • KT-31653 Incorrect transformation of the try-catch cover when inlining
  • KT-31923 Outer finally block inserted before return instruction is not excluded from catch interval of inner try (without finally) block
  • KT-31975 No diagnostic on error type
  • KT-32106 New type inference: IDE shows error but the code compiles succesfully
  • KT-32138 New type inference: Invoking type-aliased extension function red in IDE, but compiles
  • KT-32168 Problem in IDE with new type inference and delegate provider
  • KT-32243 New type inference: Type mistmatch in collection type usage
  • KT-32345 New type inference: Error when using helper method to create delegate provider
  • KT-32372 Type inference errors in IDE
  • KT-32415 Type mismatch on argument of super constructor of inner class call
  • KT-32423 New type inference: IllegalStateException: Error type encountered: org.jetbrains.kotlin.types.ErrorUtils$UninferredParameterTypeConstructor@211a538e (ErrorType)
  • KT-32435 New inference preserves platform types while old inference can substitute them with the nullable result type
  • KT-32456 New type inference: "IllegalStateException: Error type encountered" when adding emptyList to mutableList
  • KT-32499 Kotlin/JS 1.3.40 - new type inference with toTypedArray() failure
  • KT-32742 Gradle/JS "Unresolved Reference" when accessing setting field of Dynamic object w/ React
  • KT-32818 Type inference failed with elvis operator
  • KT-32862 New type inference: Compilation error "IllegalArgumentException: ClassicTypeSystemContextForCS couldn't handle" with overloaded generic extension function reference passed as parameter
  • KT-33033 New type inference: Nothing incorrectly inferred as return type when null passed to generic function with expression if statement body
  • KT-33197 Expression with branch resolving to List<…> ultimately resolves to MutableList<…>
  • KT-33263 "IllegalStateException: Type variable TypeVariable(T) should not be fixed!" with generic extension function and in variance
  • KT-33542 Compilation failed with "AssertionError: Suspend functions may be called either as suspension points or from another suspend function"
  • KT-33544 "UnsupportedOperationException: no descriptor for type constructor of TypeVariable(R)?" with BuilderInference and elvis operator
  • KT-33592 New type inference: Missed error in IDE — Unsupported [Collection literals outside of annotations]
  • KT-33932 Compiler fails when it encounters inaccessible classes in javac integration mode
  • KT-34029 StackOverflowError for access to nested object inheriting from containing generic class at org.jetbrains.kotlin.descriptors.impl.LazySubstitutingClassDescriptor.getTypeConstructor
  • KT-34060 UNUSED_PARAMETER is not reported on unused parameters of non-operator getValue/setValue/prodiveDelegate functions
  • KT-34282 Missing diagnostic of unresolved for callable references with overload resolution ambiguity
  • KT-34391 New type inference: False negative EXPERIMENTAL_API_USAGE_ERROR with callable reference
  • KT-34395 KtWhenConditionInRange.isNegated() doesn't work
  • KT-34500 CompilationException when loop range is DoubleArray and loop parameter is casted to super-type (e.g. Any, Number, etc.)
  • KT-34647 Gradually rename experimentality annotations
  • KT-34649 Deprecate -Xexperimental flag
  • KT-34743 Support trailing comma in the compiler
  • KT-34779 JVM: "get()" is not invoked in optimized "for" loop over CharSequence.withIndex() with unused variable ("_") for the element in destructuring declaration
  • KT-34786 Flaky type inference for lambda expressions
  • KT-34820 New type inference: Red code when expanding type-aliased extension function in LHS position of elvis
  • KT-34888 Kotlin REPL ignores compilation errors in class declaration
  • KT-35035 Incorrect state-machine generated for suspend lambda inside inline lambda
  • KT-35101 "AssertionError: Mapping ranges should be presented in inline lambda" with a callable reference argument to inline lambda
  • KT-35168 New type inference: "UninitializedPropertyAccessException: lateinit property subResolvedAtoms has not been initialized"
  • KT-35172 New type inference: False positive type mismatch if nullable type after elvis and safe call inside lambda is returning (expected type is specified explicitly)
  • KT-35224 New type inference: Java call candidate with varargs as Array isn't present if SAM type was used in this call
  • KT-35262 Suspend function with Unit return type returns non-unit value if it is derived from function with non-unit return type
  • KT-35426 IncompatibleClassChangeError: Method 'int java.lang.Object.hashCode()' must be Methodref constant when invoking on super with explicit gener...
Read more

Kotlin 1.3.70 EAP 3

20 Feb 07:50

Choose a tag to compare

Kotlin 1.3.70 EAP 3 Pre-release
Pre-release

Compiler

  • KT-31411 Support mode of compiler where it analyses source-set as platform one, but produces only metadata for that specific source-set
  • KT-32372 Type inference errors in IDE
  • KT-33542 Compilation failed with "AssertionError: Suspend functions may be called either as suspension points or from another suspend function"
  • KT-33544 "UnsupportedOperationException: no descriptor for type constructor of TypeVariable(R)?" with BuilderInference and elvis operator
  • KT-36297 NI: ClassNotFoundException: compiler emits reference to nonexisting class for code with nested inline lambdas
  • KT-36719 Enable new inference in IDE since 1.3.70

IDE

  • KT-33820 Stop using com.intellij.codeInsight.AnnotationUtil#isJetbrainsAnnotation
  • KT-33846 Stop using com.intellij.openapi.vfs.newvfs.BulkFileListener.Adapter

IDE. Completion

  • KT-36306 Code completion inlines content of FQN class if completion called in string

IDE. Debugger

  • KT-16277 Can't set breakpoint for object construction

IDE. Inspections and Intentions

  • KT-33771 False positive "Redundant Companion reference" with Java synthetic property and same-named object property
  • KT-36307 False positive "Remove redundant '.let' call" for nested lambda change scope reference

IDE. Multiplatform

  • KT-33321 In IDE, actuals of intermediate test source set are incorrectly matched against parent main source-set (not test one)

IDE. Refactorings

  • KT-24122 Long pauses with "removing redundant imports" dialog on rename refactoring for IDEA Kotlin Plugin
  • KT-32514 Moving file in with 'search for references' inlines contents in referred source code
  • KT-32999 Renaming parameter does not rename usage in named argument in a different file
  • KT-33372 Rename resource cause its content to be replaced
  • KT-34415 Refactor > Change signature of an overridden actual function from a platform class: "org.jetbrains.kotlin.descriptors.InvalidModuleException: Accessing invalid module descriptor"
  • KT-34419 Refactor > Change signature > add a function parameter: "org.jetbrains.kotlin.descriptors.InvalidModuleException: Accessing invalid module descriptor"
  • KT-35689 Change Signature: "InvalidModuleException: Accessing invalid module descriptor" on attempt to change receiver type of a member abstract function
  • KT-35903 Change Signature refactoring crashes by InvalidModuleException on simplest examples

IDE. Run Configurations

  • KT-35038 Running a test in a multi-module MPP project via IntelliJ Idea gutter action produces incorrect Gradle Run configuration

Libraries

  • KT-7657 scan functions for Sequences and Iterable
  • KT-33761 reduceOrNull: reduce that doesn't throw on empty input

Tools. Gradle. JS

  • KT-36714 [Gradle, JS] Webpack output doesn't consider Kotlin/JS exports (library mode)

Tools. Gradle. Multiplatform

  • KT-36469 Dependencies with compileOnly scope are not visible in Gradle build of MPP with source set hierarchies support

Kotlin 1.3.70 EAP 2

03 Feb 16:29

Choose a tag to compare

Kotlin 1.3.70 EAP 2 Pre-release
Pre-release

Compiler

  • KT-31242 "Can't find enclosing method" ProGuard compilation exception with inline and crossinline
  • KT-31923 Outer finally block inserted before return instruction is not excluded from catch interval of inner try (without finally) block
  • KT-32435 New inference preserves platform types while old inference can substitute them with the nullable result type
  • KT-34060 UNUSED_PARAMETER is not reported on unused parameters of non-operator getValue/setValue/prodiveDelegate functions
  • KT-34395 KtWhenConditionInRange.isNegated() doesn't work
  • KT-34648 Support custom messages for @RequiresOptIn-marked annotations
  • KT-34888 Kotlin REPL ignores compilation errors in class declaration
  • KT-35035 Incorrect state-machine generated for suspend lambda inside inline lambda
  • KT-35262 Suspend function with Unit return type returns non-unit value if it is derived from function with non-unit return type
  • KT-35843 Emit type annotations in JVM bytecode with target 1.8+ on basic constructions

IDE

  • KT-24399 No scrollbar in Kotlin compiler settings
  • KT-33939 Copy action leads to freezes
  • KT-35673 ClassCastException on destructuring declaration with annotation
  • KT-36008 IDEA 2020.1: Fix NSME "com.intellij.openapi.progress.util.ProgressIndicatorUtils.awaitWithCheckCanceled(Future)"

IDE. Completion

  • KT-23026 Code completion: Incorrect const in class declaration line
  • KT-23834 Code completion and auto import do not suggest an extension that differs from member only in type parameters
  • KT-29840 'const' is suggested inside the class body, despite it's illegal

IDE. Gradle

  • KT-35442 KotlinMPPGradleModelBuilder shows warnings on import because it can't find a not existing directory

IDE. Gradle. Script

  • KT-34795 Gradle Kotlin DSL new project template: don't use setUrl syntax in settings.gradle.kts pluginManagement block
  • KT-35268 .gradle.kts: don't load script's configurations that are not connected to any Gradle project
  • KT-35563 Track script modifications between IDE restarts

IDE. Inspections and Intentions

  • KT-35242 Text-range based inspection range shifts wrongly due to incremental analysis of whitespace and comments
  • KT-35837 Editing Introduce import alias does not affect KDoc
  • KT-36018 'Missing visibility' and 'missing explicit return type' compiler and IDE diagnostics for explicit API mode
  • KT-36020 Intention 'Add public modifier' is not available for highlighted declaration in explicit API mode
  • KT-36021 KDoc shouldn't be highlighted on 'visibility must be specified' warning in explicit API mode

IDE. Navigation

  • KT-35310 PIEAE: "During querying provider Icon preview" at ClsJavaCodeReferenceElementImpl.multiResolve() on navigation to Kotlin declaration

IDE. Run Configurations

  • KT-34503 "Nothing here" is shown as a drop-down list for "Run test" gutter icon for a multiplatform test with expect/actual parts in platform-agnostic code
  • KT-35480 "Nothing here" is shown as a drop-down list for "Run test" gutter icon for a multiplatform test with object in JS and Native code

IDE. Script

  • KT-35886 UI Freeze: ScriptClassRootsCache.hasNotCachedRoots 25 seconds

IDE. Wizards

New Features

  • KT-36043 Gradle, JS: Add continuous-mode run configuration in New Project Wizard templates

New Project Wizard

  • KT-35584 Module names restrictions are too strong with no reason
  • KT-35690 Artifact and group fields are mixed up
  • KT-35694 settings.gradle.kts are created even for Groovy DSL
  • KT-35695 kotlin () call used for dependencies in non-MPP Groovy-DSL JVM project
  • KT-35710 Non-Java source/resource roots are created for Kotlin/JVM JPS
  • KT-35712 Source root templates: switching focus from root reverts custom settings to default
  • KT-35713 Custom settings for project name, artifact and group ID are reverted to default on Previous/Next
  • KT-35711 Maven: "Kotlin Test framework" template adds wrong dependency
  • KT-35715 Maven: custom repository required for template (ktor) is not added to pom.xml
  • KT-35718 Gradle: ktor: not existing repository is added
  • KT-35719 Multiplatform library: entryPoint specifies not existing class name
  • KT-35720 Multiplatform library: Groovy DSL: improve the script for nativeTarget calculation

Libraries

  • KT-15363 Builder functions for basic containers
  • KT-21327 Add Deque & ArrayDeque to Kotlin standard library
  • KT-33141 UnderMigration annotation is defined in Kotlin, but supposed to be used from Java
  • KT-35347 Create method Collection.randomOrNull()
  • KT-36118 Provide API for subtyping relationship between CoroutineContextKey and elements associated with this key

Tools. Gradle

  • KT-25206 Delegate build/run to gradle results regularly in cannot delete proto.tab.value.s

Tools. Gradle. JS

  • KT-31894 browserRun makes the build fail if no Kotlin sources are present
  • KT-35599 Actualize Node and Yarn versions in 1.3.70

Tools. Gradle. Multiplatform

  • KT-31570 Deprecate Kotlin 1.2.x MPP Gradle plugins

Tools. Gradle. Native

  • KT-29395 Allow setting custom destination directory for Kotlin/Native binaries
  • KT-31542 Allow changing the name of a framework created by CocoaPods Gradle plugin
  • KT-32750 Support subspecs in CocoaPods plugin
  • KT-35352 Support exporting K/N dependencies to shared and static libraries
  • KT-35934 Spaces are not escaped in K/N compiler parameters
  • KT-35958 Compiling test sources with no sources in main roots halts the Gradle daemon

Tools. J2K

  • KT-18001 Multi-line comments parsed inside Kdoc comments
  • KT-33637 Property with getter is converted into incompailable code if backing field was not generated
  • KT-35081 Invalid code with block comment (Javadoc)
  • KT-35395 UninitializedPropertyAccessException through org.jetbrains.kotlin.nj2k.conversions.ImplicitCastsConversion when anonymous inner class passes itself as argument to outer method
  • KT-35431 "Invalid PSI class com.intellij.psi.PsiLambdaParameterType" with lambda argument in erroneous code
  • KT-35476 Expression with compound assignment logical operator is changing operator precedence without parentheses
  • KT-35478 Single line comment before constructor results in wrong code
  • KT-35739 Line break is not inserted for private property getter
  • KT-35831 Error on inserting plain text with \r char

Tools. Scripts

  • KT-34716 Implement default cache in main-kts

Tools. kapt

...

Read more

Kotlin 1.3.70 EAP 1

13 Jan 13:55

Choose a tag to compare

Kotlin 1.3.70 EAP 1 Pre-release
Pre-release

Compiler

New Features

  • KT-7745 Support named arguments in their own position even if the result appears as mixed
  • KT-34847 Lift restrictions from kotlin.Result

Performance Improvements

  • KT-14513 Suboptimal compilation of lazy delegated properties with inline getValue

Fixes

  • KT-19234 Improve "Supertypes of the following classes cannot be resolved" diagnostic
  • KT-21178 Prohibit access of protected members inside public inline members
  • KT-24461 Expect interface with suspend function with default arguments causes runtime error
  • KT-25514 Support usage of function reference with vararg where function of array is expected in new inference
  • KT-26435 Bad frame merge after inline
  • KT-27825 Gradually prohibit non-abstract classes containing abstract members invisible from that classes (internal/package-private)
  • KT-27999 Generic type is fixed too early for lambda arguments
  • KT-28940 Concurrency issue for lazy values with the post-computation phase
  • KT-29242 Conditional with generic type Nothing inside inline function throws java.lang.VerifyError: Bad return type
  • KT-30244 Unable to infer common return type for two postponed arguments
  • KT-30245 Wrong type is inferred for lambda if it has expected type with an extension receiver
  • KT-30277 Relax the "no reflection found in class path" warning for KType and related API
  • KT-30744 Invoking Interface Static Method from Extension method generates incorrect jvm bytecode
  • KT-30953 Missing unresolved if callable reference is used in the place in which common super type is computing
  • KT-31227 Prohibit using array based on non-reified type parameters as reified type arguments on JVM
  • KT-31653 Incorrect transformation of the try-catch cover when inlining
  • KT-31975 No diagnostic on error type
  • KT-32106 New type inference algorithm: IDE shows error but the code compiles succesfully
  • KT-32138 New type inference: invoking type-aliased extension function red in IDE, but compiles
  • KT-32168 Problem in IDE with new type inference and delegate provider
  • KT-32243 New type inference fails
  • KT-32345 New type inference error when using helper method to create delegate provider
  • KT-32415 Type mismatch on argument of super constructor of inner class call
  • KT-32423 NI: IllegalStateException: Error type encountered: org.jetbrains.kotlin.types.ErrorUtils$UninferredParameterTypeConstructor@211a538e (ErrorType)
  • KT-32456 NI: "IllegalStateException: Error type encountered" when adding emptyList to mutableList
  • KT-32499 Kotlin/JS - new type inference with toTypedArray() failure
  • KT-32742 Gradle/JS "Unresolved Reference" when accessing setting field of Dynamic object w/ React
  • KT-32818 Type inference failed with elvis operator
  • KT-32862 NI: Compilation error "IllegalArgumentException: ClassicTypeSystemContextForCS couldn't handle" with overloaded generic extension function reference passed as parameter
  • KT-33033 NI: Nothing incorrectly inferred as return type when null passed to generic function with expression if statement body
  • KT-33197 Expression with branch resolving to List<…> ultimately resolves to MutableList<…>
  • KT-33263 "IllegalStateException: Type variable TypeVariable(T) should not be fixed!" with generic extension function and in variance
  • KT-33592 NI: Missed error in IDE — Unsupported [Collection literals outside of annotations]
  • KT-33932 Compiler fails when it encounters inaccessible classes in javac integration mode
  • KT-34029 StackOverflowError for access to nested object inheriting from containing generic class at org.jetbrains.kotlin.descriptors.impl.LazySubstitutingClassDescriptor.getTypeConstructor
  • KT-34282 Missing diagnostic of unresolved for callable references with overload resolution ambiguity
  • KT-34391 IDE, NI: False negative EXPERIMENTAL_API_USAGE_ERROR with callable reference
  • KT-34500 CompilationException when loop range is DoubleArray and loop parameter is casted to super-type (e.g. Any, Number, etc.)
  • KT-34647 Gradually rename experimentality annotations
  • KT-34649 Deprecate -Xexperimental flag
  • KT-34743 Support trailing comma in the compiler
  • KT-34786 Flaky type inference for lambda expressions
  • KT-34820 NI: Red code when expanding type-aliased extension function in LHS position of elvis
  • KT-35101 "AssertionError: Mapping ranges should be presented in inline lambda" with a callable reference argument to inline lambda
  • KT-35168 NI: "UninitializedPropertyAccessException: lateinit property subResolvedAtoms has not been initialized"
  • KT-35172 NI: False positive type mismatch if nullable type after elvis and safe call inside lambda is returning (expected type is specified explicitly)
  • KT-35224 NI: Java call candidate with varargs as Array isn't present if SAM type was used in this call
  • KT-35426 IncompatibleClassChangeError: Method 'int java.lang.Object.hashCode()' must be Methodref constant when invoking on super with explicit generic type

Docs & Examples

  • KT-31118 Provide missing documentation for StringBuilder members

IDE

New Features

  • KT-27496 Color Scheme: allow changing style for suspend function calls
  • KT-30806 Add IntelliJ Color Scheme rules for property declarations
  • KT-34303 IDE should suggest to import an extension iterator function when using for loop with a range
  • KT-34567 Feature: Auto add val keyword on typing data/inline class ctor parameters
  • KT-34667 Add auto-import quickfix for overloaded generic function

Performance Improvements

  • KT-30726 Editor is laggy if the code below a current line has unresolved reference
  • KT-30863 IDE freeze on editing with "Add unambiguous imports on the fly" turned on
  • KT-32868 Provide incremental analysis of file when it is applicable
  • KT-33250 KtLightClassForSourceDeclaration.isFinal() can be very slow (with implications for class inheritor search)
  • KT-33905 Optimize imports under reasonable progress
  • KT-34956 UI Freeze: PlainTextPasteImportResolver
  • KT-35121 Add support for KtSecondaryConstructors into incremental analysis
  • KT-35189 Support incremental analysis of comment and kdoc
  • KT-35590 UI freeze in kotlin.idea.core.script.ScriptConfigurationMemoryCache when editing file

Fixes

  • KT-10478 Move-statement doesn't work for methods with single-expression body and lambda as returning type
  • KT-13344 Reduce visual distraction of val keyword
  • KT-14758 ...
Read more

Kotlin 1.3.61

26 Nov 23:35

Choose a tag to compare

1.3.61

Compiler

  • KT-35004 "AssertionError: Unsigned type expected" in when range check in extension on unsigned type

IDE

  • KT-34923 [Regression] KtUltraLightMethod.hasModifierProperty("native") returns false for external Kotlin functions

Libraries

  • KT-21445 W3C DOM Touch events and interfaces are incomplete / missing

Tools. Compiler Plugins

  • KT-34991 kotlinx.serialization: False warning "Explicit @serializable annotation on enum class is required when @SerialName or @SerialInfo annotations are used on its members"

Tools. J2K

  • KT-34987 New J2K converter: @NotNull annotations are not removed after converting java code to kotlin
  • KT-35074 J2K: No auto conversion in 'for' loop with multiple init variables

1.3.60

18 Nov 19:10

Choose a tag to compare

Content

The release contains the JVM version of Kotlin compiler and also one native system dependent version for every major platform (Linux, macOS, and Windows).

CHANGELOG

1.3.60

Android

  • KT-27170 Android lint tasks fails in Gradle with MPP dependency

Compiler

New Features

  • KT-31230 Refine rules for allowed Array-based class literals on different platforms: allow Array::class everywhere, disallow Array<...>::class on non-JVM
  • KT-33413 Allow 'break' and 'continue' in 'when' statement to point to innermost surrounding loop

Performance Improvements

  • KT-14513 Suboptimal compilation of lazy delegated properties with inline getValue
  • KT-28507 Extra InlineMarker.mark invocation in generated suspending function bytecode
  • KT-29229 Intrinsify 'in' operator for unsigned integer ranges

Fixes

  • KT-7354 Confusing error message when trying to access package local java class
  • KT-9310 Don't make interface and DefaultImpls methods synchronized
  • KT-11430 Improve diagnostics for dangling lambdas
  • KT-16526 Provide better error explanation when one tries to delegate var to read-only delegate
  • KT-20258 Improve annotation rendering in diagnostic messages
  • KT-22275 Unify exceptions from null checks
  • KT-27503 Private functions uses from inside of suspendCoroutine go though accessor
  • KT-28938 Coroutines tail-call optimization does not work for generic returns that had instantiated to Unit
  • KT-29385 "AnalyzerException: Expected an object reference, but found I" for EXACTLY_ONCE non-inline contract with captured class constructor parameter
  • KT-29510 "RuntimeException: Trying to access skipped parameter" with EXACTLY_ONCE contract and nested call of crossinline lambda
  • KT-29614 java.lang.VerifyError: Bad type on operand stack - in inlining, crossinline in constructor with EXACTLY_ONCE contract
  • KT-30275 Get rid of session in FirElement
  • KT-30744 Invoking Interface Static Method from Extension method generates incorrect jvm bytecode
  • KT-30785 Equality comparison of inline classes results in boxing
  • KT-32217 FIR: support delegated properties resolve
  • KT-32433 NI: UninferredParameterTypeConstructor with class property
  • KT-32587 NI: Type mismatch "String" vs "String" in IDE on generic .invoke on generic delegated property
  • KT-32689 Shuffled line numbers in suspend functions with elvis operator
  • KT-32851 Constraint for callable reference argument doesn't take into account use-site variance
  • KT-32864 The line number of assertFailsWith in suspending function is lost
  • KT-33125 NI: "Rewrite at slice INDEXED_LVALUE_SET" with Mutable Map set index operator inside "@kotlin.BuilderInference" block
  • KT-33414 'java.lang.AssertionError: int type expected, but null was found in basic frames' in kotlin-io while building library train
  • KT-33421 Please make NOTHING_TO_INLINE warning shorter
  • KT-33504 EA-209823 - ISE: ProjectResolutionFacade$computeModuleResolverProvider$resolverForProject$$.invoke: Can't find builtIns by key CacheKeyBySdk
  • KT-33572 Scripting import with implicit receiver doesn't work
  • KT-33821 Compiler should not rely on the default locale when generating boxing for suspend functions
  • KT-18541 Prohibit "tailrec" modifier on open functions
  • KT-19844 Do not render type annotations on symbols rendered in diagnostic messages
  • KT-24913 KotlinFrontEndException with local class in init of generic class
  • KT-28940 Concurrency issue for lazy values with the post-computation phase
  • KT-31540 Change initialization order of default values for tail recursive optimized functions

Docs & Examples

  • KT-26212 Update docs to explicitly mention that union is opposite of intersect
  • KT-34086 Website, stdlib api docs: unresolved link jvm/stdlib/kotlin.text/-charsets/Charset

IDE

Fixes

  • KT-8581 'Move Statement' doesn't work for statement finished by semicolon
  • KT-9204 Shorten references and some other IDE features have problem when package name clash with class name
  • KT-17993 Annotations are colored the same as language keywords
  • KT-21037 LazyLightClassMemberMatchingError$WrongMatch “Matched :BAR MemberIndex(index=0) to :BAR MemberIndex(index=1) in KtLightClassImpl” after duplicating values inside enum class
  • KT-23305 We should be able to see platform-specific errors in common module
  • KT-23461 Move statement up/down attaches a comment block to the function being moved
  • KT-26960 IDE doesn't report actual without expect placed into a custom platform-agnostic source set
  • KT-27243 LazyLightClassMemberMatchingError when overriding hidden member
  • KT-28404 Gradle configuration page is missing from a New Project Wizard creation flow for multiplatform templates
  • KT-30824 No highlighting of declaration/usage of function with functional-type (lambda) parameter on its usage
  • KT-31117 AssertionError at CompletionBindingContextProvider._getBindingContext when typing any character within string with injected Kotlin
  • KT-31139 "Override members" on enum inserts semicolon before enum body
  • KT-31810 Paste inside indented .trimIndent() raw string doesn't respect indentation
  • KT-32401 Exceptions while running IDEA in headless mode for building searchable options
  • KT-32543 UltraLight support for Kotlin collections.
  • KT-32544 Support UltraLight classes for local/anonymous/enum classes
  • KT-32799 2019.2 RC (192.5728.74) Kotlin plugin exception during build searchable options (Directory index may not be queried for default project)
  • KT-33008 IDEA does not report in MPP: Upper bound of a type parameter cannot be an array
  • KT-33316 Kotlin Facet: make sure the order of allPlatforms value is fixed
  • KT-33561 LazyLightClassMemberMatchingError when overloading synthetic member
  • KT-33584 Make kotlin light classes return no-arg constructor when no-arg (or jpa) compiler plugin is enabled
  • KT-33775 please remove usages of org.intellij.plugins.intelliLang.inject.InjectorUtils#putInjectedFileUserData(com.intellij.lang.injection.MultiHostRegistrar, com.intellij.openapi.util.Key, T) deprecated eons ago
  • KT-33813 Poor formatting of 'Selected target platforms' and 'Depends on' in facet settings
  • KT-33937 delay() completion from kotlinx.coroutines causes happening of root package in code
  • KT-33973 Kotlin objects could abuse idea plugin functionality
  • KT-34000 Import quickfix does not work for extension methods from objects
  • KT-34070 "No target platforms selected" message for commonTest facet at mobile shared library project
  • [KT-34191](https://youtrack.jetbrains.com/issue/KT-...
Read more