Releases: JetBrains/kotlin
Releases · JetBrains/kotlin
Kotlin 1.4-M2
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-37432Do not include annotations fields into 'visibility must be explicitly specified' check in api mode
Performance Improvements
KT-27362Anonymous classes representing function/property references contain rarely used methodsKT-35626NI: Performance problem with many type parametersKT-36047Compiler produces if-chain instead of switch when when subject captured as variableKT-36638Use 'java/lang/StringBuilder.append (C)Ljava/lang/StringBuilder;' when appending single character in JVM_IRKT-37389Avoid type approximation during generation constraints with EQUALITY kindKT-37392Avoid substitution and type approximation for simple callsKT-37546NI: high memory and CPU consumption due to creating useless captured types (storing in approximated types cache, unneeded computations)
Fixes
KT-11265Factory pattern and overload resolution ambiguityKT-27524Inline class is boxed when used with suspend modifierKT-27586ClassCastException occurs if the Result (or any other inline class) is returned from a lambdaKT-30419Use boxed version of an inline class in return type position for covariant and generic-specialized overridesKT-31163FIR: consider replacing comparisons with compareTo calls and some additional intrinsicsKT-31585ClassCastException with derived class delegated to generic class with inline class type argumentKT-31823NI: Type mismatch with a star projection andUnsafeVarianceKT-33119Pre-increment for inline class wrapping Int compiles to direct increment instead of inc-implKT-33715Kotlin/Native: metadata compilerKT-34048IllegalAccessError when initializing val property in EXACTLY_ONCE lambdaKT-34433NI: Type mismatch with a star projection andUnsafeVarianceKT-35133FIR Java: don't set 'isOperator' for methods with non-operator namesKT-35234ClassCastException with creating an inline class from a function reference of covariant or generic-specialized overrideKT-35406Generic type implicitly inferred as Nothing with no warningKT-35587Plain namespace strings in JvmNameResolver.PREDEFINED_STRINGS are prone to namespace changes during jar relocation.KT-36044NI: premature fixation a type variable if there were nested lambdas (constraint source was the deepest lambda)KT-36057[FIR] Incorrect smartcastKT-36069NI: TYPE_MISMATCH caused by incorrect inference to NothingKT-36125Callable reference resolution ambiguity error is not displayed properly in the IDEKT-36191IDE locks loading packages and editing file containingtrykeyword inside string templateKT-36222NI: Improve error message about nullability mismatch for a generic callKT-36249NI doesn't use upper bound for T of called function during infer return type and as a result infer it toAny?if the resulting type was intersection typeKT-36345FIR: record argument mapping for use in back-endKT-36446NI: "UnsupportedOperationException no descriptor for type constructor of IntegerLiteralType[Int,Long,Byte,Short]" with BuilderInference and delegateKT-36758[FIR] Unresolved callable reference to member of local classKT-36759[FIR] Unsupported callable reference resolution for methods with default parametersKT-36762[FIR] Unresolvedarray.clone()KT-36764[FIR] Bug in inference with DefinitelyNotNull typesKT-36816NI: definitely not-null (T!!) types in invariant positions don't approximate to T inside inference processKT-36819NI: premature completion of lambdas, which are passed somewhereKT-36850Incorrect private visibility of sealed class constructorsKT-36856Throwing exception when there is inheritance in Kotlin from Java class, which contains methods with the same JVM descriptorsKT-36879Introduce FIR_IDENTICAL in diagnostic testsKT-36881FIR: completion don't runs for return expressionsKT-36887[FIR] Unresolved member in nested lambda in initializerKT-36905[FIR] Unresolved in lambda in default argument positionKT-36953AssertionError: "Unsigned type expected: null" when there is a range with an unsigned typeKT-37009FIR: Bound smart-cast lostKT-37027FIR: Wrong projection on spread + varargs on non-final typesKT-37038NI: redundant lambda's arrow breaks CST calculation for extension lambdasKT-37043NI: inference T to Any? if there was elvis between Java out-type and reifiedmaterializefor this type without out projectionKT-37066[FIR] Wrong type inference for lambdasKT-37070[FIR] Unresolved parameters of outer lambda in scope of inner lambdaKT-37087"IllegalStateException: Can't find method 'invoke()'" for mutable property reference in default value of an inline function parameterKT-37091[FIR] Wrong inferred type of when-expression if when-argument is not-null-asserted and type is not specifies explicitlyKT-37176[FIR] Incorrect resolution mode for statements of blockKT-37302Unexpected conversion:Intconstant inferred toLongin when expressionKT-37327FIR: Smartcast problemKT-37343NI: definitely not null types pre-approximation is inconsistent with OIKT-37380NI: broken some code with def not null types due to skip needed constraintsKT-37419NI: UNRESOLVED_REFERENCE_WRONG_RECEIVER is reported in case lambda with receiver is returned fromwhenexpressionKT-37434Kotlin/JS, Kotlin/Native: fun interfaces: SAM conversion to Kotlin interface is not compiled with RESOLUTION_TO_CLASSIFIERKT-37447Expression from annotation entry in value parameter inside value parameter should be marked as USED_AS_EXPRESSIONKT-37453Type arguments not checked to be empty for candidates with no declared parametersKT-37488[FIR] Incorrect exhaustiveness checking for branches with equals to object that implements sealed classKT-37497NI: 'super' is not an expression, it can not be used as a receiver for extension functionsKT-37530NI: instantiation of abstract class via callable reference argument causes run time InstantiationErrorKT-37531NI: callable reference argument with left hand side type parameter causes frontend exceptionKT-37554NI: Nothing is inferred incorrectly with elvis returnKT-37579NI: inconsistent behaviour with OI around implic...
Kotlin 1.3.72
1.3.72
Compiler
KT-37107kotlinc allows calling default constructor of class with no constructorsKT-37406NI: "UnsupportedOperationException: no descriptor for type constructor of TypeVariable(T)" when compiling*.gradle.ktsfile
IDE
KT-37483Kotlin localisationKT-37629False positive "Unsupported [literal prefixes and suffixes]" for infix functionKT-37808"Resolve pasted references" dialog freezes UI for 20 seconds when pasting kotlin code
IDE. Completion
KT-37144Completion goes into an infinite loop with Arrow 0.10.4 dependency
IDE. Debugger
KT-37767Debugger, NPE happens while stepping.
IDE. Editing
KT-35135UI freeze: not enough checkCancelled on resolve path
IDE. Inspections and Intentions
KT-37217Replace UseExperimental with OptIn intention removes target prefixes for annotations
IDE. Native
KT-38079IDEA navigates to wrong line of source code from Native stack trace
IDE. Navigation
KT-37487Destructuring declarations are called "destruction declarations" in UI
Tools. Gradle. Native
KT-37696MPP Gradle plugin: False positive parallel execution detection if build started with --continue
Kotlin 1.3.71
1.3.71
Compiler
KT-36095201: False positive OVERLOAD_RESOLUTION_AMBIGUITY with JavaEnum.valueOfandEnum.values()referenceKT-37040'No explicit visibility in API mode' should not be reported on enum membersKT-37204AssertionError: "No delegated property metadata owner for" with lazy inside inline function
Docs & Examples
KT-37029Kotlin 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 hasenumwith elements in quotes andinternal lazy valin another part of codeKT-37200StackOverflowError in LightMethodBuilder.equals when analysing Kotlin filesKT-37229java.lang.NoSuchMethodError: 'com.intellij.psi.impl.light.LightJavaModule, com.intellij.psi.impl.light.LightJavaModule.findModule after updating kotlin plugin to 1.3.70KT-37273No error in editor when typing unresolved reference in super constructor lambdaKT-37414Not all imports are added on paste if code is formatted after pasteKT-37553Run inspections after general highlight pass
IDE. Code Style, Formatting
KT-37545Continuation indent for method's parameter changes in call chain
IDE. Hints
KT-37537IDE is missing or swallowing keystrokes when hint popups are displayed
IDE. Inspections and Intentions
KT-36478IDE suggests to use 'OptIn' annotation when it is not available in the used version of kotlin-stdlibKT-37294False positive "Unused unary operator" on negative long annotation value
IDE. Navigation
KT-36657KotlinFindUsagesHandler#processElementUsages always return false if options.isSearchForTextOccurrences is false
IDE. Refactorings
KT-37451Change of signature error: Type of parameter cannot be resolvedKT-37597Support Suggest rename and change signature refactorings in Kotlin for IDEA 2020.1
IDE. Run Configurations
KT-36781Override ConfigurationFactory::getId method in Kotlin plugin to avoid problems with localizations
JavaScript
KT-37386Incorrect JS generated by the compiler: function is erased by the function parameter
Tools. Gradle. JS
KT-36196Investigate performance problems while resolving in projects with npm dependencies
Tools. Gradle. Multiplatform
KT-37264In intermediate common source sets, internals are not visible from their dependsOn source sets during Gradle build
Tools. Gradle. Native
KT-37565MPP plugin: Forbid parallel in-process execution of the Kotlin/Native compiler
Tools. kapt
KT-37241Kapt: Classpath entry points to a non-existent location: ...build/intermediates/javac/debug/classes...
Kotlin 1.4-M1
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-4240Type inference possible improvements: analyze lambda with expected type from the outer callKT-7304Smart-casts and generic calls with multiple bounds on type parametersKT-7745Support named arguments in their own position even if the result appears as mixedKT-7770SAM for Kotlin classesKT-8834Support function references with default values as other function typesKT-10930Expected type isn't taken into account for delegated propertiesKT-11723Support coercion to Unit in callable reference resolutionKT-14416Support of @PolymorphicSignature in Kotlin compilerKT-16873Support COERSION_TO_UNIT for suspend lambdasKT-17643Inferring type of Pair based on known Map typeKT-19869Support function references to functions with vararg if expected type ends with repeated vararg element typeKT-21178Prohibit access of protected members inside public inline membersKT-21368Improve type inferenceKT-25866Iterable.forEach does not accept functions that return non-Unit valuesKT-26165Support VarHandle in JVM codegenKT-27582Allow contracts on final non-override membersKT-28298Allow references to generic (reified) type parameters in contractsKT-31230Refine rules for allowed Array-based class literals on different platforms: allowArray::classeverywhere, disallowArray<...>::classon non-JVMKT-31244Choose Java field during overload resolution with a pure Kotlin propertyKT-31734Empty parameter list required on Annotations of function typesKT-33990Type argument isn't checked during resolution partKT-33413Allow 'break' and 'continue' in 'when' statement to point to innermost surrounding loopKT-34743Support trailing comma in the compilerKT-34847Lift restrictions fromkotlin.Result
Fixes
KT-2869Incorrect resolve with 'unsafe call error' and genericsKT-3630Extension property (generic function type) does not workKT-3668Infer type parameters for extension 'get' in delegated propertyKT-3850Receiver check fails when type parameter has another parameter as a boundKT-3884Generic candidate with contradiction is preferred over matching global functionKT-4625Poor error highlighting when assigning not matched type to index operatorKT-5449Wrong resolve when functions differ only in the nullability of generic typeKT-5606"Type mismatch" in Java constructor call with SAM lambda andvarargparameterKT-6005Type inference problem in sam constructorsKT-6591Overloaded generic extension function call with null argument resolved incorrectlyKT-6812Type inference fails when passing a null instead of a generic typeKT-7298Bogus type inference error in generic method call translated from JavaKT-7301Type inference error in Kotlin code translated from JavaKT-7333Type inference fails with star-projections in code translated from JavaKT-7363Kotlin code with star-projections translated from Java does not typecheckKT-73783-dimension array type inference failKT-7410Call resolution error appears only after adding non-applicable overloadKT-7420Type inference sometimes infers less specific type than in JavaKT-7758Type of lambda can't be inferedKT-8218Wrong 'equals' for generic types with platform type and error typeKT-8265Non-typesafe program is compiled without errorsKT-8637Useless diagnostics for type parameters with unsafe nullabilityKT-8966Smart casts don't work with implicit receiver and extension on type parameter with boundsKT-10265Type inference problem when using sealed class and interfacesKT-10364Call completeCall on variable before invoke resolutionKT-10612java.util.Comparator.comparing type inferenceKT-10628Wrong type mismatch with star projection of inner class inside use-site projected typeKT-10662Smartcast with not-null assertionKT-10681Explicit type arguments not taken into account when determining applicable overloads of a generic functionKT-10755Not "least" common super-type is selected for nested 'if' result in presence of multiple inheritanceKT-10929Type inference based on receiver type doesn't work for delegated properties in some casesKT-10962Wrong resolution when argument has unstable DataFlowValueKT-11108RxJava failed platform type inferenceKT-11137Java synthetic property does not function for a type with projectionKT-11144UninferredParameterTypeConstructor exception during buildKT-11184Type inference failed for combination of safe-call, elvis, HashSet and emptySetKT-11218Type inference incorrectly infers nullable type for type parameterKT-11323Type inference failed in call with lambda returning emptyListKT-11331Unexpected "Type inference failed" in SAM-conversion to projected typeKT-11444Type inference failsKT-11664Disfunctional inference with nullable type parametersKT-11894Type substitution bug related platform typesKT-11897No error REIFIED_TYPE_FORBIDDEN_SUBSTITUTION on captured typeKT-11898Type inference error related to captured typesKT-12036Type inference failedKT-12038non-null checks and inferenceKT-12190Type inference for TreeMap type parameters from expected type doesn't work when passing comparator.KT-12684A problem with reified type-parameters and smart-castsKT-12833'it' does not work in typed containers of lambdasKT-13002"Error type encountered: UninferredParameterTypeConstructor" with elvis and whenKT-13028cast with star on on type with contravariant generic parameter makes the compiler crashKT-13339Type inference failed for synthetic Java property call on implicit smart cast receiverKT-13398"Type T is not a subtype of Any"KT-13683Type infer...
Kotlin 1.3.70
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-34648Support custom messages for @RequiresOptIn-marked annotations
Performance Improvements
KT-14513Suboptimal compilation of lazy delegated properties with inline getValue
Fixes
KT-19234Improve "Supertypes of the following classes cannot be resolved" diagnosticKT-21178Prohibit access of protected members inside public inline membersKT-24461Expect interface with suspend function with default arguments causes runtime errorKT-25514Support usage of function reference with vararg where function of array is expected in new inferenceKT-26435Bad frame merge after inlineKT-27825Gradually prohibit non-abstract classes containing abstract members invisible from that classes (internal/package-private)KT-27999Generic type is fixed too early for lambda argumentsKT-28940Concurrency issue for lazy values with the post-computation phaseKT-29242Conditional with generic type Nothing inside inline function throwsjava.lang.VerifyError: Bad return typeKT-30244Unable to infer common return type for two postponed argumentsKT-30245Wrong type is inferred for lambda if it has expected type with an extension receiverKT-30277Relax the "no reflection found in class path" warning for KType and related APIKT-30744Invoking Interface Static Method from Extension method generates incorrect jvm bytecodeKT-30953Missing unresolved if callable reference is used in the place in which common super type is computingKT-31227Prohibit using array based on non-reified type parameters as reified type arguments on JVMKT-31242"Can't find enclosing method" proguard compilation exception with inline and crossinlineKT-31411Support mode of compiler where it analyses source-set as platform one, but produces only metadata for that specific source-setKT-31653Incorrect transformation of the try-catch cover when inliningKT-31923Outer finally block inserted before return instruction is not excluded from catch interval of inner try (without finally) blockKT-31975No diagnostic on error typeKT-32106New type inference: IDE shows error but the code compiles succesfullyKT-32138New type inference: Invoking type-aliased extension function red in IDE, but compilesKT-32168Problem in IDE with new type inference and delegate providerKT-32243New type inference: Type mistmatch in collection type usageKT-32345New type inference: Error when using helper method to create delegate providerKT-32372Type inference errors in IDEKT-32415Type mismatch on argument of super constructor of inner class callKT-32423New type inference: IllegalStateException: Error type encountered: org.jetbrains.kotlin.types.ErrorUtils$UninferredParameterTypeConstructor@211a538e (ErrorType)KT-32435New inference preserves platform types while old inference can substitute them with the nullable result typeKT-32456New type inference: "IllegalStateException: Error type encountered" when adding emptyList to mutableListKT-32499Kotlin/JS 1.3.40 - new type inference with toTypedArray() failureKT-32742Gradle/JS "Unresolved Reference" when accessing setting field of Dynamic object w/ ReactKT-32818Type inference failed with elvis operatorKT-32862New type inference: Compilation error "IllegalArgumentException: ClassicTypeSystemContextForCS couldn't handle" with overloaded generic extension function reference passed as parameterKT-33033New type inference: Nothing incorrectly inferred as return type when null passed to generic function with expression if statement bodyKT-33197Expression 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 varianceKT-33542Compilation 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 operatorKT-33592New type inference: Missed error in IDE — Unsupported [Collection literals outside of annotations]KT-33932Compiler fails when it encounters inaccessible classes in javac integration modeKT-34029StackOverflowError for access to nested object inheriting from containing generic class atorg.jetbrains.kotlin.descriptors.impl.LazySubstitutingClassDescriptor.getTypeConstructorKT-34060UNUSED_PARAMETER is not reported on unused parameters of non-operator getValue/setValue/prodiveDelegate functionsKT-34282Missing diagnostic of unresolved for callable references with overload resolution ambiguityKT-34391New type inference: False negative EXPERIMENTAL_API_USAGE_ERROR with callable referenceKT-34395KtWhenConditionInRange.isNegated() doesn't workKT-34500CompilationException when loop range is DoubleArray and loop parameter is casted to super-type (e.g. Any, Number, etc.)KT-34647Gradually rename experimentality annotationsKT-34649Deprecate-XexperimentalflagKT-34743Support trailing comma in the compilerKT-34779JVM: "get()" is not invoked in optimized "for" loop over CharSequence.withIndex() with unused variable ("_") for the element in destructuring declarationKT-34786Flaky type inference for lambda expressionsKT-34820New type inference: Red code when expanding type-aliased extension function in LHS position of elvisKT-34888Kotlin REPL ignores compilation errors in class declarationKT-35035Incorrect state-machine generated for suspend lambda inside inline lambdaKT-35101"AssertionError: Mapping ranges should be presented in inline lambda" with a callable reference argument to inline lambdaKT-35168New type inference: "UninitializedPropertyAccessException: lateinit property subResolvedAtoms has not been initialized"KT-35172New type inference: False positive type mismatch if nullable type after elvis and safe call inside lambda is returning (expected type is specified explicitly)KT-35224New type inference: Java call candidate with varargs as Array isn't present if SAM type was used in this callKT-35262Suspend function with Unit return type returns non-unit value if it is derived from function with non-unit return typeKT-35426IncompatibleClassChangeError: Method 'int java.lang.Object.hashCode()' must be Methodref constantwhen invoking on super with explicit gener...
Kotlin 1.3.70 EAP 3
Compiler
KT-31411Support mode of compiler where it analyses source-set as platform one, but produces only metadata for that specific source-setKT-32372Type inference errors in IDEKT-33542Compilation 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 operatorKT-36297NI: ClassNotFoundException: compiler emits reference to nonexisting class for code with nested inline lambdasKT-36719Enable new inference in IDE since 1.3.70
IDE
KT-33820Stop using com.intellij.codeInsight.AnnotationUtil#isJetbrainsAnnotationKT-33846Stop using com.intellij.openapi.vfs.newvfs.BulkFileListener.Adapter
IDE. Completion
KT-36306Code completion inlines content of FQN class if completion called in string
IDE. Debugger
KT-16277Can't set breakpoint for object construction
IDE. Inspections and Intentions
KT-33771False positive "Redundant Companion reference" with Java synthetic property and same-named object propertyKT-36307False positive "Remove redundant '.let' call" for nested lambda change scope reference
IDE. Multiplatform
KT-33321In IDE, actuals of intermediate test source set are incorrectly matched against parent main source-set (not test one)
IDE. Refactorings
KT-24122Long pauses with "removing redundant imports" dialog on rename refactoring for IDEA Kotlin PluginKT-32514Moving file in with 'search for references' inlines contents in referred source codeKT-32999Renaming parameter does not rename usage in named argument in a different fileKT-33372Rename resource cause its content to be replacedKT-34415Refactor > Change signature of an overridden actual function from a platform class: "org.jetbrains.kotlin.descriptors.InvalidModuleException: Accessing invalid module descriptor"KT-34419Refactor > Change signature > add a function parameter: "org.jetbrains.kotlin.descriptors.InvalidModuleException: Accessing invalid module descriptor"KT-35689Change Signature: "InvalidModuleException: Accessing invalid module descriptor" on attempt to change receiver type of a member abstract functionKT-35903Change Signature refactoring crashes by InvalidModuleException on simplest examples
IDE. Run Configurations
KT-35038Running a test in a multi-module MPP project via IntelliJ Idea gutter action produces incorrect Gradle Run configuration
Libraries
KT-7657scan functions for Sequences and IterableKT-33761reduceOrNull: 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-36469Dependencies with compileOnly scope are not visible in Gradle build of MPP with source set hierarchies support
Kotlin 1.3.70 EAP 2
Compiler
KT-31242"Can't find enclosing method" ProGuard compilation exception with inline and crossinlineKT-31923Outer finally block inserted before return instruction is not excluded from catch interval of inner try (without finally) blockKT-32435New inference preserves platform types while old inference can substitute them with the nullable result typeKT-34060UNUSED_PARAMETER is not reported on unused parameters of non-operator getValue/setValue/prodiveDelegate functionsKT-34395KtWhenConditionInRange.isNegated() doesn't workKT-34648Support custom messages for @RequiresOptIn-marked annotationsKT-34888Kotlin REPL ignores compilation errors in class declarationKT-35035Incorrect state-machine generated for suspend lambda inside inline lambdaKT-35262Suspend function with Unit return type returns non-unit value if it is derived from function with non-unit return typeKT-35843Emit type annotations in JVM bytecode with target 1.8+ on basic constructions
IDE
KT-24399No scrollbar in Kotlin compiler settingsKT-33939Copy action leads to freezesKT-35673ClassCastException on destructuring declaration with annotationKT-36008IDEA 2020.1: Fix NSME "com.intellij.openapi.progress.util.ProgressIndicatorUtils.awaitWithCheckCanceled(Future)"
IDE. Completion
KT-23026Code completion: Incorrectconstin class declaration lineKT-23834Code completion and auto import do not suggest an extension that differs from member only in type parametersKT-29840'const' is suggested inside the class body, despite it's illegal
IDE. Gradle
KT-35442KotlinMPPGradleModelBuilder shows warnings on import because it can't find a not existing directory
IDE. Gradle. Script
KT-34795Gradle Kotlin DSL new project template: don't usesetUrlsyntax insettings.gradle.ktspluginManagementblockKT-35268.gradle.kts: don't load script's configurations that are not connected to any Gradle projectKT-35563Track script modifications between IDE restarts
IDE. Inspections and Intentions
KT-35242Text-range based inspection range shifts wrongly due to incremental analysis of whitespace and commentsKT-35837Editing Introduce import alias does not affect KDocKT-36018'Missing visibility' and 'missing explicit return type' compiler and IDE diagnostics for explicit API modeKT-36020Intention 'Add public modifier' is not available for highlighted declaration in explicit API modeKT-36021KDoc shouldn't be highlighted on 'visibility must be specified' warning in explicit API mode
IDE. Navigation
KT-35310PIEAE: "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 codeKT-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-35886UI Freeze: ScriptClassRootsCache.hasNotCachedRoots 25 seconds
IDE. Wizards
New Features
KT-36043Gradle, JS: Add continuous-mode run configuration in New Project Wizard templates
New Project Wizard
KT-35584Module names restrictions are too strong with no reasonKT-35690Artifact and group fields are mixed upKT-35694settings.gradle.ktsare created even for Groovy DSLKT-35695kotlin ()call used for dependencies in non-MPP Groovy-DSL JVM projectKT-35710Non-Java source/resource roots are created for Kotlin/JVM JPSKT-35712Source root templates: switching focus from root reverts custom settings to defaultKT-35713Custom settings for project name, artifact and group ID are reverted to default on Previous/NextKT-35711Maven: "Kotlin Test framework" template adds wrong dependencyKT-35715Maven: custom repository required for template (ktor) is not added to pom.xmlKT-35718Gradle: ktor: not existing repository is addedKT-35719Multiplatform library: entryPoint specifies not existing class nameKT-35720Multiplatform library: Groovy DSL: improve the script for nativeTarget calculation
Libraries
KT-15363Builder functions for basic containersKT-21327Add Deque & ArrayDeque to Kotlin standard libraryKT-33141UnderMigration annotation is defined in Kotlin, but supposed to be used from JavaKT-35347Create method Collection.randomOrNull()KT-36118Provide API for subtyping relationship between CoroutineContextKey and elements associated with this key
Tools. Gradle
KT-25206Delegate build/run to gradle results regularly in cannot delete proto.tab.value.s
Tools. Gradle. JS
KT-31894browserRunmakes the build fail if no Kotlin sources are presentKT-35599Actualize Node and Yarn versions in 1.3.70
Tools. Gradle. Multiplatform
KT-31570Deprecate Kotlin 1.2.x MPP Gradle plugins
Tools. Gradle. Native
KT-29395Allow setting custom destination directory for Kotlin/Native binariesKT-31542Allow changing the name of a framework created by CocoaPods Gradle pluginKT-32750Support subspecs in CocoaPods pluginKT-35352Support exporting K/N dependencies to shared and static librariesKT-35934Spaces are not escaped in K/N compiler parametersKT-35958Compiling test sources with no sources in main roots halts the Gradle daemon
Tools. J2K
KT-18001Multi-line comments parsed inside Kdoc commentsKT-33637Property with getter is converted into incompailable code if backing field was not generatedKT-35081Invalid code with block comment (Javadoc)KT-35395UninitializedPropertyAccessException throughorg.jetbrains.kotlin.nj2k.conversions.ImplicitCastsConversionwhen anonymous inner class passes itself as argument to outer methodKT-35431"Invalid PSI class com.intellij.psi.PsiLambdaParameterType" with lambda argument in erroneous codeKT-35476Expression with compound assignment logical operator is changing operator precedence without parenthesesKT-35478Single line comment before constructor results in wrong codeKT-35739Line break is not inserted for private property getterKT-35831Error on inserting plain text with \r char
Tools. Scripts
KT-34716Implement default cache in main-kts
Tools. kapt
...
Kotlin 1.3.70 EAP 1
Compiler
New Features
KT-7745Support named arguments in their own position even if the result appears as mixedKT-34847Lift restrictions fromkotlin.Result
Performance Improvements
KT-14513Suboptimal compilation of lazy delegated properties with inline getValue
Fixes
KT-19234Improve "Supertypes of the following classes cannot be resolved" diagnosticKT-21178Prohibit access of protected members inside public inline membersKT-24461Expect interface with suspend function with default arguments causes runtime errorKT-25514Support usage of function reference with vararg where function of array is expected in new inferenceKT-26435Bad frame merge after inlineKT-27825Gradually prohibit non-abstract classes containing abstract members invisible from that classes (internal/package-private)KT-27999Generic type is fixed too early for lambda argumentsKT-28940Concurrency issue for lazy values with the post-computation phaseKT-29242Conditional with generic type Nothing inside inline function throwsjava.lang.VerifyError: Bad return typeKT-30244Unable to infer common return type for two postponed argumentsKT-30245Wrong type is inferred for lambda if it has expected type with an extension receiverKT-30277Relax the "no reflection found in class path" warning for KType and related APIKT-30744Invoking Interface Static Method from Extension method generates incorrect jvm bytecodeKT-30953Missing unresolved if callable reference is used in the place in which common super type is computingKT-31227Prohibit using array based on non-reified type parameters as reified type arguments on JVMKT-31653Incorrect transformation of the try-catch cover when inliningKT-31975No diagnostic on error typeKT-32106New type inference algorithm: IDE shows error but the code compiles succesfullyKT-32138New type inference: invoking type-aliased extension function red in IDE, but compilesKT-32168Problem in IDE with new type inference and delegate providerKT-32243New type inference failsKT-32345New type inference error when using helper method to create delegate providerKT-32415Type mismatch on argument of super constructor of inner class callKT-32423NI: IllegalStateException: Error type encountered: org.jetbrains.kotlin.types.ErrorUtils$UninferredParameterTypeConstructor@211a538e (ErrorType)KT-32456NI: "IllegalStateException: Error type encountered" when adding emptyList to mutableListKT-32499Kotlin/JS - new type inference with toTypedArray() failureKT-32742Gradle/JS "Unresolved Reference" when accessing setting field of Dynamic object w/ ReactKT-32818Type inference failed with elvis operatorKT-32862NI: Compilation error "IllegalArgumentException: ClassicTypeSystemContextForCS couldn't handle" with overloaded generic extension function reference passed as parameterKT-33033NI: Nothing incorrectly inferred as return type when null passed to generic function with expression if statement bodyKT-33197Expression 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 varianceKT-33592NI: Missed error in IDE — Unsupported [Collection literals outside of annotations]KT-33932Compiler fails when it encounters inaccessible classes in javac integration modeKT-34029StackOverflowError for access to nested object inheriting from containing generic class atorg.jetbrains.kotlin.descriptors.impl.LazySubstitutingClassDescriptor.getTypeConstructorKT-34282Missing diagnostic of unresolved for callable references with overload resolution ambiguityKT-34391IDE, NI: False negative EXPERIMENTAL_API_USAGE_ERROR with callable referenceKT-34500CompilationException when loop range is DoubleArray and loop parameter is casted to super-type (e.g. Any, Number, etc.)KT-34647Gradually rename experimentality annotationsKT-34649Deprecate -Xexperimental flagKT-34743Support trailing comma in the compilerKT-34786Flaky type inference for lambda expressionsKT-34820NI: Red code when expanding type-aliased extension function in LHS position of elvisKT-35101"AssertionError: Mapping ranges should be presented in inline lambda" with a callable reference argument to inline lambdaKT-35168NI: "UninitializedPropertyAccessException: lateinit property subResolvedAtoms has not been initialized"KT-35172NI: False positive type mismatch if nullable type after elvis and safe call inside lambda is returning (expected type is specified explicitly)KT-35224NI: Java call candidate with varargs as Array isn't present if SAM type was used in this callKT-35426IncompatibleClassChangeError: Method 'int java.lang.Object.hashCode()' must be Methodref constantwhen invoking on super with explicit generic type
Docs & Examples
KT-31118Provide missing documentation for StringBuilder members
IDE
New Features
KT-27496Color Scheme: allow changing style for suspend function callsKT-30806Add IntelliJ Color Scheme rules for property declarationsKT-34303IDE should suggest to import an extension iterator function when using for loop with a rangeKT-34567Feature: Auto add val keyword on typing data/inline class ctor parametersKT-34667Add auto-import quickfix for overloaded generic function
Performance Improvements
KT-30726Editor is laggy if the code below a current line has unresolved referenceKT-30863IDE freeze on editing with "Add unambiguous imports on the fly" turned onKT-32868Provide incremental analysis of file when it is applicableKT-33250KtLightClassForSourceDeclaration.isFinal() can be very slow (with implications for class inheritor search)KT-33905Optimize imports under reasonable progressKT-34956UI Freeze: PlainTextPasteImportResolverKT-35121Add support for KtSecondaryConstructors into incremental analysisKT-35189Support incremental analysis of comment and kdocKT-35590UI freeze in kotlin.idea.core.script.ScriptConfigurationMemoryCache when editing file
Fixes
Kotlin 1.3.61
1.3.61
Compiler
KT-35004"AssertionError: Unsigned type expected" inwhenrange check in extension on unsigned type
IDE
KT-34923[Regression] KtUltraLightMethod.hasModifierProperty("native") returns false for external Kotlin functions
Libraries
KT-21445W3C DOM Touch events and interfaces are incomplete / missing
Tools. Compiler Plugins
KT-34991kotlinx.serialization: False warning "Explicit @serializable annotation on enum class is required when @SerialName or @SerialInfo annotations are used on its members"
Tools. J2K
1.3.60
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-27170Android lint tasks fails in Gradle with MPP dependency
Compiler
New Features
KT-31230Refine rules for allowed Array-based class literals on different platforms: allowArray::classeverywhere, disallowArray<...>::classon non-JVMKT-33413Allow 'break' and 'continue' in 'when' statement to point to innermost surrounding loop
Performance Improvements
KT-14513Suboptimal compilation of lazy delegated properties with inline getValueKT-28507Extra InlineMarker.mark invocation in generated suspending function bytecodeKT-29229Intrinsify 'in' operator for unsigned integer ranges
Fixes
KT-7354Confusing error message when trying to access package local java classKT-9310Don't make interface and DefaultImpls methods synchronizedKT-11430Improve diagnostics for dangling lambdasKT-16526Provide better error explanation when one tries to delegate var to read-only delegateKT-20258Improve annotation rendering in diagnostic messagesKT-22275Unify exceptions from null checksKT-27503Private functions uses from inside of suspendCoroutine go though accessorKT-28938Coroutines tail-call optimization does not work for generic returns that had instantiated to UnitKT-29385"AnalyzerException: Expected an object reference, but found I" for EXACTLY_ONCE non-inline contract with captured class constructor parameterKT-29510"RuntimeException: Trying to access skipped parameter" with EXACTLY_ONCE contract and nested call of crossinline lambdaKT-29614java.lang.VerifyError: Bad type on operand stack - in inlining, crossinline in constructor with EXACTLY_ONCE contractKT-30275Get rid of session in FirElementKT-30744Invoking Interface Static Method from Extension method generates incorrect jvm bytecodeKT-30785Equality comparison of inline classes results in boxingKT-32217FIR: support delegated properties resolveKT-32433NI: UninferredParameterTypeConstructor with class propertyKT-32587NI: Type mismatch "String" vs "String" in IDE on generic .invoke on generic delegated propertyKT-32689Shuffled line numbers in suspend functions with elvis operatorKT-32851Constraint for callable reference argument doesn't take into account use-site varianceKT-32864The line number of assertFailsWith in suspending function is lostKT-33125NI: "Rewrite at slice INDEXED_LVALUE_SET" with Mutable Map set index operator inside "@kotlin.BuilderInference" blockKT-33414'java.lang.AssertionError: int type expected, but null was found in basic frames' in kotlin-io while building library trainKT-33421Please make NOTHING_TO_INLINE warning shorterKT-33504EA-209823 - ISE: ProjectResolutionFacade$computeModuleResolverProvider$resolverForProject$$.invoke: Can't find builtIns by key CacheKeyBySdkKT-33572Scripting import with implicit receiver doesn't workKT-33821Compiler should not rely on the default locale when generating boxing for suspend functionsKT-18541Prohibit "tailrec" modifier on open functionsKT-19844Do not render type annotations on symbols rendered in diagnostic messagesKT-24913KotlinFrontEndException with local class in init of generic classKT-28940Concurrency issue for lazy values with the post-computation phaseKT-31540Change initialization order of default values for tail recursive optimized functions
Docs & Examples
KT-26212Update docs to explicitly mention that union is opposite of intersectKT-34086Website, stdlib api docs: unresolved link jvm/stdlib/kotlin.text/-charsets/Charset
IDE
Fixes
KT-8581'Move Statement' doesn't work for statement finished by semicolonKT-9204Shorten references and some other IDE features have problem when package name clash with class nameKT-17993Annotations are colored the same as language keywordsKT-21037LazyLightClassMemberMatchingError$WrongMatch “Matched :BAR MemberIndex(index=0) to :BAR MemberIndex(index=1) in KtLightClassImpl” after duplicating values inside enum classKT-23305We should be able to see platform-specific errors in common moduleKT-23461Move statement up/downattaches a comment block to the function being movedKT-26960IDE doesn't reportactualwithoutexpectplaced into a custom platform-agnostic source setKT-27243LazyLightClassMemberMatchingError when overriding hidden memberKT-28404Gradle configuration page is missing from a New Project Wizard creation flow for multiplatform templatesKT-30824No highlighting of declaration/usage of function with functional-type (lambda) parameter on its usageKT-31117AssertionError atCompletionBindingContextProvider._getBindingContextwhen typing any character within string with injected KotlinKT-31139"Override members" on enum inserts semicolon before enum bodyKT-31810Paste inside indented.trimIndent()raw string doesn't respect indentationKT-32401Exceptions while running IDEA in headless mode for building searchable optionsKT-32543UltraLight support for Kotlin collections.KT-32544Support UltraLight classes for local/anonymous/enum classesKT-327992019.2 RC (192.5728.74) Kotlin plugin exception during build searchable options (Directory index may not be queried for default project)KT-33008IDEA does not report in MPP: Upper bound of a type parameter cannot be an arrayKT-33316Kotlin Facet: make sure the order of allPlatforms value is fixedKT-33561LazyLightClassMemberMatchingError when overloading synthetic memberKT-33584Make kotlin light classes return no-arg constructor when no-arg (or jpa) compiler plugin is enabledKT-33775please remove usages of org.intellij.plugins.intelliLang.inject.InjectorUtils#putInjectedFileUserData(com.intellij.lang.injection.MultiHostRegistrar, com.intellij.openapi.util.Key, T) deprecated eons agoKT-33813Poor formatting of 'Selected target platforms' and 'Depends on' in facet settingsKT-33937delay() completion from kotlinx.coroutines causes happening of root package in codeKT-33973Kotlin objects could abuse idea plugin functionalityKT-34000Import quickfix does not work for extension methods from objectsKT-34070"No target platforms selected" message for commonTest facet at mobile shared library project- [
KT-34191](https://youtrack.jetbrains.com/issue/KT-...