Releases: JetBrains/kotlin
Releases · JetBrains/kotlin
Kotlin 1.4.30-M1
You could find information about EAP program and setup instructions here
CHANGELOG
1.4.30-M1
Android
KT-42383HMPP: Bad IDEA dependencies: Missing dependency from p1:jvmAndAndroid to p2:jvmAndAndroid
Backend. Native
KT-38772Native: support non-reified type parameters in typeOfKT-42234Move LLVM optimization parameters into konan.propertiesKT-42649IndexOutOfBoundsException during InlineClassTransformer loweringKT-42942Native: optimize peak backend memory by clearing BindingContext after psi2irKT-43198init blocks inside inline classesKT-31072Don't use non-reified arguments to specialize type operations in IR inliner
Backend. JS
KT-41227KJS IR: don't copy to child's prototype references to the function from parent
Backend. IR
KT-41227KJS IR: don't copy to child's prototype references to the function from parent
Compiler
New Features
KT-28055Consider supportinginitblocks inside inline classesKT-28056Consider supporting non-public primary constructors for inline classesKT-42094Allow open callable members in expect interfacesKT-43129FIR: Support OverloadResolutionByLambdaReturnType
Performance Improvements
KT-41352JVM IR: reduce bytecode size in for loops and range checks with 'until' by not using inclusive endKT-41644NI: Infinite compilationKT-42791OutOfMemoryError on compilation using kotlin 1.4 on a class with a lot of type inferenceKT-42920NI: Improve performance around adding constraints
Fixes
KT-22465Excessive synthetic method for private setter from superclassKT-26229Lambda/anonymous function argument in parentheses is not supported for callsInPlace effectKT-32228Inconsistent boxing/unboxing for inline classes when interface is specialized by object expressionKT-32450Inline class incorrectly gets re-wrapped when provided to a functionKT-35849Missing nullability assertion on lambda return value if expected type has generic return value typeKT-35902Kotlin generates a private parameterless constructor for constructors taking inline class arguments with default valuesKT-36769JVM IR: Missing LVT entries for inline function (default) parameters at call siteKT-36982JVM IR: SAM adapter classes are generated as syntheticKT-37007JVM IR: extraneous property accessors are generated in multifile facade for InlineOnly propertyKT-37317[FIR] Add support of extension functions in postponed lambda completionKT-38400FIR: interface abstract is preferred to Any method in super resolveKT-38536JVM IR: bound adapted function references are not inlinedKT-38656FIR: determine overridden member visibility properlyKT-38901FIR: Make behavior of integer literals overflow consistent with FE 1.0KT-39709[FIR] False positive UNINITIALIZED_VARIABLE in presence of complex graph with jumpsKT-39923Result.Failure will get wrapped with Success when using with RxJavaKT-40198'$default' methods in 'kotlin/test/AssertionsKt' generated as non-synthetic by JVM_IRKT-40262ACC_DEPRECATED flag not generated for property getter delegate in multifile class facade in JVM_IRKT-40282Inline class wrapping Any gets double boxedKT-40464JVM_IR does not generate LINENUMBER at closing brace of (suspend) lambdaKT-40948IllegalAccessError while initializing val property in EXACTLY_ONCE lambda that is passed to another functionKT-41468JVM IR: IllegalAccessError on access to abstract base member from another package, from anonymous object inside abstract classKT-41493JVM IR: names of classes for local delegated variables contain the variable name twiceKT-41792[FIR] Introduce & use ConeAttribute.UnsafeVarianceKT-41793[FIR] Make captured types accessible at the end of resolveKT-41809JVM IR: name for internal $default method doesn't include module nameKT-41810JVM IR: Deprecated(HIDDEN) class is incorrectly generated as syntheticKT-41841JVM IR: delegates for private functions with default arguments are generated in multifile classesKT-41857Flaky 'ConcurrentModificationException' throughkotlin.serialization.DescriptorSerializerKT-41903JVM IR: do not generate LineNumberTable in auto-generated members of data classesKT-41957JVM IR: step into suspend function goes to the first line of the fileKT-41960JVM IR: smart step into members implemented with delegation to interface doesn't workKT-41961JVM IR: line numbers are not generated in JvmMultifileClass facade declarationsKT-41962JVM IR: intermittent -1 line numbers in the state machine cause double stepping in the debuggerKT-42002JVM / IR: IllegalStateException: "No mapping for symbol: VAR IR_TEMPORARY_VARIABLE" caused by named argumentsKT-42021JVM / IR: "IndexOutOfBoundsException: Index 0 out of bounds for length 0" during IR lowering with suspend conversionKT-42033JVM IR: accidental override in Map subclass with custom implementations of some membersKT-42043JVM IR: Don't generate collection stubs when implementing methods with more specific return typesKT-42044Compiler error when lambda with contract surrounded with parenthesesKT-42114JVM_IR generates stub for 'removeIf' in abstract classes implementing 'List' and 'Set'KT-42115JVM_IR doesn't generate 'next' and 'hasNext' method in an abstract class implementing 'ListIterator'KT-42116FIR: Java accessor function should not exist in scope together with relevant propertyKT-42117IR-based evaluator cannot handle Java static final fieldsKT-42118FIR2IR: field-targeted annotation is placed on a property, not on a fieldKT-42130FIR: type variable is observed after when condition analysisKT-42132FIR2IR: companion function reference has no dispatch receiverKT-42137JVM IR: AbstractMethodError on complex hierarchy where implementation comes from another supertype and has a more specific typeKT-42186JVM / IR: Infinite cycle in for expression when unsigned bytes are used in decreasing loop rangeKT-42251JVM / IR: "IllegalStateException: Descriptor can be left only if it is last" when comparing the i-th element of the container of Int? andiwith changeKT-42253JVM IR: NoSuchFieldError on local delegated property in inline function whose call site happens before declaration in the sourceKT-42281JVM / IR: AnalyzerException when comparing Int and array that c...
Kotlin 1.4.21
CHANGELOG
IDE. Gradle Integration
KT-42561"Could not get unknown property 'sourceSets' for project" when running JVM module with included MPP moduleKT-43511Task 'MainKt.main()' not found in root project
Libraries
KT-43586Source documentation: ExperimentalPathAPI misspeltKT-43745replacefor strings ignores case of locale characters
Native. C and ObjC Import
KT-43265Kotlin/Native fails to generate alias for C enum entryKT-43530Kotlin/Native compilation fails with "Symbol for public kotlin/Array.size.|-8255337774232345969[0] is unbound"
Native
KT-43517On Kotlin 1.4.20 we got kotlin.NotImplementedError when try compile iOS framework
Tools. Gradle. JS
KT-43668PackageJson task use file dependencies as is (files and directories), but only files necessary
Checksums
| File | Sha256 |
|---|---|
| kotlin-compiler-1.4.21.zip | 46720991a716e90bfc0cf3f2c81b2bd735c14f4ea6a5064c488e04fd76e6b6c7 |
| kotlin-native-prebuilt-linux-1.4.21.tar.gz | ae54afed3e3f65a2e3170b203679e86c78979c0c53dd0d7d7a38cf4fa8d46ca7 |
| kotlin-native-prebuilt-macos-1.4.21.tar.gz | f3a65ea070cbfca89497a14340f1530d1ec37875efc8be9a972b6a7aefde29c0 |
| kotlin-native-prebuilt-windows-1.4.21.zip | 5359f53b01bdc5bd4fd956630e33a0ba36ea0471a8e86fe5405266d899694223 |
Kotlin 1.4.20
CHANGELOG
Android
KT-42121Deprecate Kotlin Android Extensions compiler pluginKT-42267Platform declaration clasherror in IDE when usingkotlinx.android.parcel.ParcelizeKT-42406Long or infinite code analysis on simple files modification
Backend. Native
KT-27534Bridges to Nothing-returning methods have incorrect signatureKT-30284Native: Nothing? type for expression override and crashKT-36430Optimize when with in range casesKT-38787Missing optimization for "in range" checkKT-39100Make Native behaviour of property initialization consistent with JVMKT-39798Override equals/hashCode in functional interface wrappers on NativeKT-39800equals/hashCode on adapted function references on NativeKT-41394Compilation failed: Backend Internal error: Exception during IR loweringKT-41907Framework test segfaults on GC on watchos_x86 compiled with -opt
Compiler
New Features
KT-21147JEP 280: Indify String Concatenation (StringConcatFactory)KT-34178Scripts should be able to access imports objectsKT-35549Support kotlin-android-extensions in JVM IR backend (for use with Jetpack Compose projects)KT-31567Support special semantics for underscore-named catch block parameters
Performance Improvements
KT-20571Coroutines: Reduce number of local variables stored at suspension pointKT-28016Coroutine state-machines spill/unspill shall be optimized using data-flow analysisKT-33394UI freezes triggered by QualifiedExpressionResolver.resolveToPackageOrClassPrefixKT-36814Support optimized delegated properties in JVM_IRKT-36829Optimize 'in' expressions (operator fun contains) in JVM_IRKT-41741NI: "AssertionError: Empty intersection for types" with generic Java collectionKT-42195NI: prohibitively long compilation time for values of nested data structures with type inferenceKT-42221Native compiler never finishes frontend phase after migrating to Kotlin 1.4.10
Fixes
KT-11713Refine visibility check for synthetic property with protected setterKT-16222Coroutine should be clearing any internal state as soon as possible to avoid memory leaksKT-25519Extra inline marks inside suspending function callable reference bytecodeKT-33226Object INSTANCE field not annotated with NotNull in generated bytecodeKT-35495FIR: forbid non-Java synthetic propertiesKT-35651Kotlin stdlib has greater resolution priority than jars added via @file:DependsOn annotationKT-35716Using @jvmoverloads in @JvmStatic functions in interface companion objects causes a ClassFormatErrorKT-35730FIR: consider creating fake overrides for objectsKT-36951IllegalStateException: Expected some types: Throwing exception when there is a type parameter upper bound for itselfKT-37321[FIR] Support java array in type argumentKT-37431[FIR] Support Builder InferenceKT-38272FIR2IR: use lazy IR symbols for externals & fake overridesKT-38333FIR: CCE on red code with assignment used as expressionKT-38334FIR: CCE when resolving try-as-expressionKT-38336FIR: NPE with corrupted numeric constant literalKT-38397FIR: Exception while resolving contract definitionKT-38444[FIR] Invoke extension lambda with safe callKT-38470FIR: ConeDefinitelyNotNullType in signatureKT-38471FIR: ConeIntersectionType in signatureKT-38925Internal error: wrong bytecode generated. (AssertionError: int type expected, but null was found in basic frames)KT-38989FIR: Refine sealed classes exhaustiveness in case of sealed subclassKT-38992FIR: Refine type resolution for inner classesKT-39000FIR: Support smartcast after reference equality checkKT-39005FIR: Resolve plusAssign in a dependent contextKT-39008FIR: Investigate strange effect of type alias and not-nullable bound on inferenceKT-39012FIR: Inference doesn't get through elvis to lambda parameterKT-39028FIR: Strange resolution to synthetic property with implicit extension receiver while there's an explicit receiverKT-39032FIR: Ambiguity in member scope of a type parameter with multiple boundsKT-39033FIR: Ambiguity when calling generic overridden propertyKT-39034FIR: Support nested extension function typesKT-39040FIR: Deserialize annotations from compiled Kotlin binariesKT-39043FIR: Bare types incorrectly work with type aliasesKT-39044FIR: Add fillInStackTrace to member scope of kotlin.ThrowableKT-39046FIR: Implicit types in lambdas left when call argument is a type castKT-39048FIR: Inference fails with integer literal used as ComparableKT-39050FIR: Type resolver doesn't see nested classes from super class of a local classKT-39070FIR: Ambiguity on super calls to hashCode/equals when having super interface and classKT-39072FIR: Subtyping check doesn't affect nullability of safe-call receiverKT-39076FIR: Synthetic property is not a var because of @nullable annotation on parameterKT-39080FIR: Smart casts remain incorrect if lambda is present in when branchKT-39374Wrong bytecode generated for suspend function call with EXACTLY_ONCE lambda capturing a variable initialized in when-subjectKT-39621[FIR] Support when exhaustiveness checker for java enumsKT-40135JVM IR does not generate restricted suspend lambdasKT-40382Missing proper jvmSignature for synthesized equals/hashCode/toString in inline classesKT-40605JVM IR: IndexOutOfBoundsException caused by inner class passed to generic outer class method with Nothing type argumentKT-40664JVM: No bounds check in optimization ofULong in UInt..UIntKT-40665JVM: No resolved function check when optimizingin/containswith mismatched bound typesKT-41014FIR2IR: when/where/how to determine the presence of a backing field for a propertyKT-41018FIR2IR: sort members during de/serializationKT-41144False positive "Redundant spread operator" in when statement and generic vararg argumentKT-41218HMPP: arrayList declarations are visible both from stdlib-common and stdlib-jvm and lead to false-pos...
Kotlin 1.4.20-RC
Compiler
New Features
KT-31567Support special semantics for underscore-named catch block parameters
Performance Improvements
KT-41741NI: "AssertionError: Empty intersection for types" with generic Java collectionKT-42195NI: prohibitively long compilation time for values of nested data structures with type inferenceKT-42221Native compiler never finishes frontend phase after migrating to Kotlin 1.4.10
Fixes
KT-17691Wrong argument order in resolved call with varargsKT-25114Prohibit @JvmStatic on functions in private companionsKT-33917Prohibit to expose anonymous types from private inline functionsKT-35870Forbid secondary enum class constructors which do not delegate to the primary constructorKT-39098NI: parameter of anonymous function can be inferred to Any? if another parameter's type is specifiedKT-41176NI with Gson: "ClassCastException: java.util.ArrayList cannot be cast to java.lang.Void"KT-41194ClassCastException on returning Result.failure from lambda within suspend functionKT-42438NI: ClassCastException: cannot be cast to java.lang.Void caused by when statement inrunfunctionKT-42699False positive NON_JVM_DEFAULT_OVERRIDES_JAVA_DEFAULT diagnostic in new jvm-default modesKT-42706Kotlin 1.4 infers generic is Nothing instead of actual Foo class (Android project)
IDE
KT-42883No highlighting for elements marked as @deprecated in stdlib
IDE. Decompiler, Indexing, Stubs
KT-41646"AssertionError: ContentElementType: FILE"; Code analysis never finishes on some files from my project
IDE. Gradle Integration
KT-38830addTransitiveDependenciesOnImplementedModules performance is slowing down Android Studio Gradle Sync
IDE. Inspections and Intentions
KT-43037Disable "Incomplete destructuring declaration" in 1.4.20
JavaScript
KT-37829Kotlin JS IR: "Properties without fields are not supported" for companion objectsKT-39740KJS / IR: Can't use Serializable and JsExport annotations at the same time
Libraries
KT-19192Provide file system extensions/APIs based on java.nio.file.PathKT-41837Remove @ExperimentalStdlibApi from CancellationException
Tools. CLI
KT-41916Add JVM target bytecode version 15
Tools. Gradle. JS
KT-42494KJS / Gradle: "Configuration cache state could not be cached" caused by Gradle configuration cache
Tools. Gradle. Native
KT-42531Gradle task "podGenIos" fails if a Pod with a static library is added.
Kotlin 1.4.20-M2
Info about particular features
KT-25960Kapt: Support new @JvmDefault functionalityKT-40030Parcelize: Support the new Parcelize plugin in GradleKT-41799String.replace performance improvementsKT-41622IDE: Kotlin scripting support can’t find context class from same project
CHANGELOG
1.4.20-M2
Android
KT-42121Deprecate Kotlin Android Extensions compiler pluginKT-42267Platform declaration clasherror in IDE when usingkotlinx.android.parcel.ParcelizeKT-42406Long or infinite code analysis on simple files modification
Compiler
KT-11713Refine visibility check for synthetic property with protected setterKT-21147JEP 280: Indify String Concatenation (StringConcatFactory)KT-34178Scripts should be able to access imports objectsKT-41484JVM IR: support -Xemit-jvm-type-annotationsKT-42005JVM / IR: "NullPointerException: Parameter specified as non-null is null" when toString is called on inline class with not primitive propertyKT-42450NI: "IllegalStateException: Error type encountered: NonFixed:" with coroutinesKT-42523Missed DefaultImpls for interface in-jvm-default=allmode on inheriting it from interface compiled in old schemeKT-42524Wrong specialization diagnostic is reported on inheriting from java interface with default with -Xjvm-default=all-compatibilityKT-42546HMPP: bogus overload resolution ambiguity on using and expect-function declaration with nullable expect in a signature
Docs & Examples
KT-42318No documentation forkotlin.js.js
IDE
KT-38959IDE: False negative EXPLICIT_DELEGATION_CALL_REQUIRED, "IllegalArgumentException: Range must be inside element being annotated"
IDE. Debugger
KT-38659Evaluate Expression:toString()on variable returns error when breakpoint is incommonTestsourceset
IDE. Decompiler, Indexing, Stubs
KT-28732Stub file element types should be registered early enoughKT-41346IDE: "AssertionError: Stub type mismatch: USER_TYPE!=REFERENCE_EXPRESSION" withCollapsedDumpParserclass from IDEA SDKKT-41859File analysis never ending with kotlinx.cli (AssertionError: Stub type mismatch: TYPEALIAS!=CLASS)
IDE. Gradle. Script
KT-41141Gradle Kotlin DSL: "cannot access 'java.lang.Comparable'. Check your module classpath" with empty JDK in Project structure
IDE. Inspections and Intentions
KT-38915"Remove explicit type specification" intention should be disabled in explicit API modeKT-38981"Specify return type explicitly" inspection is not reported for declaration annotated with @PublishedApi in Explicit Api modeKT-39026'Specify return type explicitly' intention duplicates compiler warning in Explicit api mode
IDE. Script
KT-41622IDE: Kotlin scripting support can't find context class from same projectKT-41905IDE / Script: FilePathPattern parameter in @KotlinScript annotation is not reflected correctly in Pattern / ExtensionKT-42206Cannot load script definitions using org.jetbrains.kotlin.jsr223.ScriptDefinitionForExtensionAndIdeConsoleRootsSource
IDE. Tests Support
KT-37799Don't show a target choice in context menu for a test launched on specific platform
IDE. Wizards
KT-42372Rrename test classes in wizard template to avoid name clashing
JavaScript
KT-38136JS IR BE: add an ability to generate separate js files for each module and maybe each libraryKT-38868[MPP / JS / IR] IllegalStateException: "Serializable class must have single primary constructor" for expect class without primary constructor with @serializable annotationKT-41275KJS / IR: "IllegalStateException: Can't find name for declaration FUN" caused by default value in constructor parameterKT-41627KJS / IR / Serialization: IllegalStateException: Serializable class must have single primary constructor
KMM Plugin
KT-41522KMM: exceptions for Mobile Multiplatform plugin are suggested to report to Google, not JetBrainsKT-42065[KMM plugin] iOS apps fail to launch on iOS simulator with Xcode 12
Libraries
KT-41799String.replace performance improvements
Native. C and ObjC Import
KT-41250[C-interop] Stubs for C functions without parameter names should have non-stable names
Native. Platform libraries
KT-42191Support for Xcode 12
Native. Runtime. Memory
KT-42275"Memory.cpp:1605: runtime assert: Recursive GC is disallowed" sometimes when using Kotlin from Swift deinit
Native. Stdlib
KT-39145MutableData append method
Tools. Compiler Plugins
KT-36329Provide diagnostic in kotlinx.serialization when custom serializer mismatches property typeKT-40030Move the Parcelize functionality out of the Android Extensions plugin
Tools. Gradle. JS
KT-39838Kotlin/JS Gradle tooling: NPM dependencies of different kinds with different versions of the same package fail with "Cannot find package@version in yarn.lock"KT-40202Kotlin/JS: Gradle: NPM version range operators are written into package.json as escape sequencesKT-40986KJS / Gradle: BuildOperationQueueFailure when two different versions of js library are used as dependenciesKT-42222KJS / Gradle: "Cannot find package@version in yarn.lock" when npm dependencies of one package but with different version are used in projectKT-42339Support dukat binaries generation
Tools. Gradle. Native
KT-40999CocoaPods Gradle plugin: Support custom cinterop options when declaring a pod dependency.KT-41844Kotlin 1.4.10 gradle configuration error with cocoapods using multiple multiplatform modules
Tools. Scripts
KT-37987Kotlin script: hyphen arguments not forwarded to scriptKT-39502Scripting: reverse order of Severity enum so that ERROR > INFOKT-42335No "caused by" info about an exception that thrown in Kotlin Script
Tools. kapt
Kotlin 1.4.20-M1
Info about particular features
New project templates in Kotlin/JS:
KT-41417- Add react template to new project wizardKT-40527- Node.JS application template in New Project WizardKT-35549- Support kotlin-android-extensions in JVM IR backend (for use with Jetpack Compose projects)
Kotlin/JS Gradle plugin upgrades:
Performance boosts:
Changelog
Backend. Native
KT-27534Bridges to Nothing-returning methods have incorrect signatureKT-30284Native: Nothing? type for expression override and crashKT-36430Optimize when with in range casesKT-38787Missing optimization for "in range" checkKT-39100Make Native behaviour of property initialization consistent with JVMKT-39798Override equals/hashCode in functional interface wrappers on NativeKT-39800equals/hashCode on adapted function references on NativeKT-41394Compilation failed: Backend Internal error: Exception during IR loweringKT-41907Framework test segfaults on GC on watchos_x86 compiled with -opt
Compiler
New Features
KT-35549Support kotlin-android-extensions in JVM IR backend (for use with Jetpack Compose projects)
Performance Improvements
KT-20571Coroutines: Reduce number of local variables stored at suspension pointKT-28016Coroutine state-machines spill/unspill shall be optimized using data-flow analysisKT-33394UI freezes triggered by QualifiedExpressionResolver.resolveToPackageOrClassPrefixKT-36814Support optimized delegated properties in JVM_IRKT-36829Optimize 'in' expressions (operator fun contains) in JVM_IR
Fixes
KT-16222Coroutine should be clearing any internal state as soon as possible to avoid memory leaksKT-25519Extra inline marks inside suspending function callable reference bytecodeKT-33226Object INSTANCE field not annotated with NotNull in generated bytecodeKT-35495FIR: forbid non-Java synthetic propertiesKT-35651Kotlin stdlib has greater resolution priority than jars added via @file:DependsOn annotationKT-35730FIR: consider creating fake overrides for objectsKT-36951IllegalStateException: Expected some types: Throwing exception when there is a type parameter upper bound for itselfKT-37321[FIR] Support java array in type argumentKT-37431[FIR] Support Builder InferenceKT-38272FIR2IR: use lazy IR symbols for externals & fake overridesKT-38333FIR: CCE on red code with assignment used as expressionKT-38334FIR: CCE when resolving try-as-expressionKT-38336FIR: NPE with corrupted numeric constant literalKT-38397FIR: Exception while resolving contract definitionKT-38444[FIR] Invoke extension lambda with safe callKT-38470FIR: ConeDefinitelyNotNullType in signatureKT-38471FIR: ConeIntersectionType in signatureKT-38925Internal error: wrong bytecode generated. (AssertionError: int type expected, but null was found in basic frames)KT-38989FIR: Refine sealed classes exhaustiveness in case of sealed subclassKT-38992FIR: Refine type resolution for inner classesKT-39000FIR: Support smartcast after reference equality checkKT-39005FIR: Resolve plusAssign in a dependent contextKT-39008FIR: Investigate strange effect of type alias and not-nullable bound on inferenceKT-39012FIR: Inference doesn't get through elvis to lambda parameterKT-39028FIR: Strange resolution to synthetic property with implicit extension receiver while there's an explicit receiverKT-39032FIR: Ambiguity in member scope of a type parameter with multiple boundsKT-39033FIR: Ambiguity when calling generic overridden propertyKT-39034FIR: Support nested extension function typesKT-39040FIR: Deserialize annotations from compiled Kotlin binariesKT-39043FIR: Bare types incorrectly work with type aliasesKT-39044FIR: Add fillInStackTrace to member scope of kotlin.ThrowableKT-39046FIR: Implicit types in lambdas left when call argument is a type castKT-39048FIR: Inference fails with integer literal used as ComparableKT-39050FIR: Type resolver doesn't see nested classes from super class of a local classKT-39070FIR: Ambiguity on super calls to hashCode/equals when having super interface and classKT-39072FIR: Subtyping check doesn't affect nullability of safe-call receiverKT-39076FIR: Synthetic property is not a var because of @nullable annotation on parameterKT-39080FIR: Smart casts remain incorrect if lambda is present in when branchKT-39374Wrong bytecode generated for suspend function call with EXACTLY_ONCE lambda capturing a variable initialized in when-subjectKT-39621[FIR] Support when exhaustiveness checker for java enumsKT-40135JVM IR does not generate restricted suspend lambdasKT-40382Missing proper jvmSignature for synthesized equals/hashCode/toString in inline classesKT-40605JVM IR: IndexOutOfBoundsException caused by inner class passed to generic outer class method with Nothing type argumentKT-40664JVM: No bounds check in optimization ofULong in UInt..UIntKT-40665JVM: No resolved function check when optimizingin/containswith mismatched bound typesKT-41014FIR2IR: when/where/how to determine the presence of a backing field for a propertyKT-41018FIR2IR: sort members during de/serializationKT-41144False positive "Redundant spread operator" in when statement and generic vararg argumentKT-41374JVM / IR: NoSuchMethodError in Android project compiler caused by combination of inline classes and coroutinesKT-41388NI: Backend Internal error: Exception during IR loweringKT-41429Inline class returned from suspend function should be boxed on resume pathKT-41465JVM / IR: "AssertionError: inconsistent parent function for CLASS LAMBDA_IMPL CLASS name" caused by inline method call into multiple constructorsKT-41668JVM IR: incorrect enclosing constructor for lambdas in initializers of inner classes- [
KT-41669](https://youtrack.jetbrains.com/iss...
Kotlin 1.4.10
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
Performance Improvements
KT-41149NI: Upgraded project from 1.3.72 to 1.4.0 hangs during buildKT-41335Kotlin Out of Memory When evaluating expressionKT-41400NI: Huge performance regression for kotlin compiler from 1.3.72 to 1.4.0 due to using list of dozen lambdas in a call
Fixes
KT-41005Coercion to Unit doesn't take into account nullability of a return type for lambdaKT-41043NI: StackOverflowError throughPostponedArgumentInputTypesResolver.getAllDeeplyRelatedTypeVariablesKT-41135Type Inference Regression For Property Delegate With Receiver TypeKT-41140Unresolved reference to parameter of a catch block from lambda expression on 1.4.0KT-41150IllegalStateException: Couldn't obtain compiled function body for public final inline funKT-41164NI: "IllegalStateException: Error type encountered" with callbackFlow builder inside conditionKT-41202Type inference fails in 1.4.0KT-41218HMPP: arrayList declarations are visible both from stdlib-common and stdlib-jvm and lead to false-positive resolution ambiguity in IDEKT-413081.4.0 Type inference regression in suspend blocks with elvis operator expressionsKT-41357ClassCastException for unstable smart cast on a property call receiverKT-41386NI: Type mismatch with generic type parametersKT-41426Operator compareTo is not called with nullable typeKT-41430Broken choosing overload by lambda return type inside builder inferenceKT-41470Wrong nullability assertion is generated when using the BuilderInference annotationKT-41482Add a fallback compiler flag to disable the unified null checks behavior
IDE
KT-41325SOE in IDEKotlinAsJavaSupportKT-41390Typo: equals & hashCode are written with the first uppercase letter
IDE. Code Style, Formatting
KT-41314Formatter: Frequent freezes when reformatting code (TrailingCommaPostFormatProcessor)
IDE. Debugger
KT-40417Coroutines Debugger: “No coroutine information found” in case of main() entry-point without explicit debug-artifact
IDE. Gradle. Script
KT-39542EA-218043: java.util.NoSuchElementException: No element of given type found (GradleBuildRootsManager)KT-41283Gradle scripts unable to support 1.4 language level features yet
IDE. Inspections and Intentions
KT-41264Disable “Redundant inner modifier” in 1.4.10KT-41395Inspection description misses a space (needs to be lowercase)
IDE. REPL
KT-40898REPL: "IllegalAccessError: tried to access field" caused by log4j
IDE. Wizards
KT-38921New project wizard: Backend/Console applications template with Groovy DSL generates build.gradle with KotlinCompile instead of compileKotlin
JavaScript
KT-38059Support arrays passed as named arguments to varargsKT-40964KJS / IR: don't generate "import" (short names) for external interfacesKT-41081KJS IR: nativeGetter, nativeSetter, nativeInvoke are not supported
Libraries
KT-41320Actual kotlin.test annotation typealiases are inaccessible in modular environment
Middle-end. IR
KT-41324IR: "Compilation failed: null" caused by StackOverflowError in compiler in multi-module project
Native. C and ObjC Import
KT-39762cinterop on 1.4-M2 doesn't include @deprecated Kotlin declaration for C declaration it fails to import
Native. ObjC Export
KT-39206New line characters in @deprecated annotation cause syntax error in Kotlin/native exported headerKT-40976"Unrecognized selector sent to instance" exception invoking suspending lambda from Swift in Native iOS project
Reflection
KT-40842"AssertionError: Built-in class kotlin.Any is not found" on java modular run
Tools. Compiler Plugins
KT-41321Upgrading to 1.4.0 fails compiling native with is not bound error
Tools. Gradle. Multiplatform
KT-41083Transitive dependency on an MPP with host-specific source sets fails to resolve: "Couldn't resolve metadata artifact..."
Tools. Gradle. Native
KT-40834Cannot build Kotlin Multiplatform project on Windows 10 64-bit when the Cocoapods plugin is applied
Tools. Scripts
KT-35925REPL: Springboot autoconfiguration problem (META-INF/spring.factories not found ?)
Tools. kapt
KT-41313kapt 1.4.0 throws "ZipException: zip END header not found", when Graal SVM jar in classpath
Checksums
| File | Sha256 |
|---|---|
| kotlin-compiler-1.4.10.zip | bb1a21d70e521a01ae104e99a082a6e7bb58699b86347049da521d175d0dace7 |
| kotlin-native-linux-1.4.10.tar.gz | daedd047cfacb9cff064eae705c54d2ed61ef44b61c1ec944066603b8e9a373c |
| kotlin-native-macos-1.4.10.tar.gz | e84f1622a6160a44e1f821d7539771a52389cdf3c9acaa94534b079a571503f3 |
| kotlin-native-windows-1.4.10.zip | 7728814be6f3f7906f9d55deff7ce15165c5a21f0f59ad412de815d1dab0ec1f |
Kotlin 1.4.0
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
1.4.0
Compiler
New Features
KT-23729Provide a way to generate JVM default method bodies in interfaces delegating to DefaultImplsKT-30330Introduce KotlinNothingValueException and throw it instead of NPE on expressions of type NothingKT-38435Support suspend conversion on callable references in JVM backend
Fixes
KT-35483NI: compatibility modeKT-39728Declarations fromkotlin.reflectresolved to expect-classes even in JVM modules in IDEKT-40153REPL IDE services completion fails on imports completionKT-40404Mixed named/positional arguments: argument can be passed twiceKT-40544NI: "TYPE_MISMATCH: Required: MutableList<out T!> Found: List" caused by Java interface functionKT-40555NI: Spread operator allows inferred nullable typesKT-40646NI: TYPE_MISMATCH: "inferred type is Unit but Observer was expected" caused by LieData.observe inferenceKT-40691False positive CAPTURED_VAL_INITIALIZATION with EXACTLY_ONCE contractKT-40693UnsupportedOperationException: no descriptor for type constructor of (CapturedType(out TResult)..CapturedType(out TResult)?)KT-40824Usages of a typealias lose nullability and annotations in deserializationKT-40843Unhandled exception for suspending methods that return Result typeKT-40869Recursion computation inside compiler resolve on a correct codeKT-40893Error "Captured values initialization is forbidden due to possible reassignment" when attempting to use the plusAssign operator with a java list inside an inline functionKT-40919kotlin.collections.ArrayDeque requires an explicit import when compiling with kotlinc 1.4-RC and -language-version 1.3KT-40920Regression in JvmDefault: incorrect access to missing DefaultImpls on default methods in Java interface overriding Kotlin interfaceKT-40978Prohibit using suspend functions as SAM in fun interfaces
Kotlin/Native
- Objective-C/Swift interop:
- Added native-specific frontend checkers (implemented in the main Kotlin repository: GH-3293, GH-3091, GH-3172)
- .dSYMs for release binaries on Apple platforms (GH-4085)
- Improved compilation time of builds with interop libraries by reworking cinterop under the hood.
- Experimental mimalloc allocator support (-Xallocator=mimalloc) to improve execution time performance. (GH-3704)
- Tune GC to improve execution time performance
- Various fixes to compiler caches and Gradle daemon usage
Docs & Examples
KT-35218Fix misleading in JavaDoc forcreateTempDir/createTempFileKT-36981Provide a visual illustration of source sets structure generated byios(),watchos(),tvos()presetsKT-38050Language Guide: MPP reference: add sample of language settings for all roots instead of common root only
IDE
KT-30265IDE, MPP: False negative TYPE_PARAMETER_AS_REIFIED in common codeKT-40494UAST: "NoSuchElementException: No element of given type found" with use-site target annotationKT-40639Shift IDE plugins updater numbers for Kotlin plugin
IDE. Code Style, Formatting
KT-40636Hard freeze on formatter: infinite recursion
IDE. Gradle Integration
KT-30116IDE: Unresolved reference in MPP module (androidMain source set) for annotation from common module (defined in commonMain and with JVM target)
IDE. Gradle. Script
KT-34552Deadlock in ScriptDefinitionsManagerKT-40675Gradle build file is not highlighted until navigating to symbol
IDE. JS
KT-40461Create new projects with kotlin.js.generate.executable.default=false
IDE. Script
KT-39547Kotlin script support freezes IDEAKT-40242gradle.kts: Deadlock in ScriptClassRootsUpdater
IDE. Wizards
KT-36153New Project Wizard: provide more referential info on project structure editor screenKT-39904New Project wizard 1.4: update Frontend Application to make it run with JS IRKT-40149Gradle project wizard: templates for Kotlin/JS are not properly formatted
JavaScript
KT-25859JS: support function references to functions with vararg if expected type ends with repeated vararg element typeKT-40083K/JS-IR: java.lang.IllegalStateException: has not acquired a symbol yetKT-40892KJS, IR: Unresolved references on importing classes from kotlinx-nodejs
Libraries
KT-39051Libraries native artifacts are published without sources
Tools. Gradle
KT-27816Provide a possibility to specify intermediate source sets between platform-agnostic and platform-specific test source setsKT-37720Replace ArtifactTransform with TransformActionKT-40559Adding the stdlib by default triggers warning in the Android Gradle Plugin
Tools. Gradle. JS
KT-40093Incorrect updating version of Kotlin/JS dependencies in package.json
Tools. Gradle. Multiplatform
KT-27320Provide a way to reuse same sources for similar Native targetKT-40058NPE from mpp gradle plugin on kotlinx.benchmarks
Tools. Gradle. Native
KT-40801Gradle CocoaPods integration: Cannot change a framework name
1.4-RC
Backend. Native
KT-40209java.lang.UnsupportedOperationException: org.jetbrains.kotlin.ir.declarations.impl.IrValueParameterImpl@76484173KT-40367Kotlin/Native-Swift interop (iOS): Array member initialization failing in release builds
Compiler
Fixes
KT-31025Type mismatch when callable reference is resolved with a functional expected type and SAM conversionKT-37388Consider relaxing rules about inferring Nothing inside special constructions (if, try, when)KT-37717NI: "IllegalStateException: Error type encountered" with @BuilderInferenceKT-38427New inference in branched conditions (if, when) results in odd behavior with inconsistent compiler warnings and runtime errorsKT-38899NI: False positive IMPLICIT_NOTHING_TYPE_ARGUMENT_IN_RETURN_POSITION leads to NPEKT-39468NI: overload resolution ambiguity between functions passingTandFoo<T>with a contravariant receiverKT-39618NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER: unable to infer generic type on @BuilderInference annotated lambda parameter with receiver ...
Kotlin 1.4.0-rc
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
Backend. Native
KT-40209java.lang.UnsupportedOperationException: org.jetbrains.kotlin.ir.declarations.impl.IrValueParameterImpl@76484173KT-40367Kotlin/Native-Swift interop (iOS): Array member initialization failing in release builds
Compiler
Fixes
KT-31025Type mismatch when callable reference is resolved with a functional expected type and SAM conversionKT-37388Consider relaxing rules about inferring Nothing inside special constructions (if, try, when)KT-37717NI: "IllegalStateException: Error type encountered" with @BuilderInferenceKT-38427New inference in branched conditions (if, when) results in odd behavior with inconsistent compiler warnings and runtime errorsKT-38899NI: False positive IMPLICIT_NOTHING_TYPE_ARGUMENT_IN_RETURN_POSITION leads to NPEKT-39468NI: overload resolution ambiguity between functions passingTandFoo<T>with a contravariant receiverKT-39618NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER: unable to infer generic type on @BuilderInference annotated lambda parameter with receiver typeKT-39633NI: Incorrect type parameter instantiation based on contravariant type argumentKT-39691NI: Missing SAM conversion for nullable lambdaKT-39860Make Kotlin binaries publicly available (set KotlinCompilerVersion.IS_PRE_RELEASE = false)KT-39900NI: Incorrect type inference in a lambda returning UnitKT-39925New JVM default compilation mode doesn't check that JVM target is 1.8KT-39943Write information about all-compatibility mode in metadataKT-39953NI: ClassCastException "cannot be cast to java.lang.Void" with if-else in return statement in ANdroid projectKT-40045NI: lambda’s receiver type isn't inferred properlyKT-40057NI: provideDelegate org.jetbrains.kotlin.codegen.CompilationException: Back-end (JVM) Internal error: wrong bytecode generated for static initializerKT-40060NI: postponed variable from the builder inference flows to back-end and leads to throw an exceptionKT-40112Kotlin Gradle DSL: COMPATIBILITY_WARNING onkotlin.sourceSetsblockKT-40113Kotlin Gradle DSL: "Expression 'main' cannot be invoked as a function" fordistributions.mainDSL blockKT-40128Introduce compiler key to disable compatibility resolution mechanism for new inference featuresKT-40151NI: postponed variable isn't substituted for top-level CR inside builder inferenceKT-40214AbstractMethodError in gradle subplugin which is used in Android appKT-40234Deprecation level "hidden" has no effect on callable reference argumentKT-40247NI: false positive "function should be called from coroutine or another suspend function" for suspend invoke operator in try-catchKT-40254Rewrite at slice with two callable reference argumentsKT-40269NI: "disabled Unit conversions" error has appeared on green codeKT-40337NI: false positive "function should be called from coroutine or another suspend function" for suspend invoke operator inwhenblockKT-40406Prohibit reflection on adapted callable references
IDE
KT-39968Paths in KotlinJavaRuntime library aren't updated after you run IDE from a different directoryKT-39989NullPointerException when opening Kotlin facets in Project Structure dialog in IDEA 192KT-40311Create change_notes for 1.4 in IDE plugin description
IDE. Debugger
KT-39808(CoroutineDebugger) Doesn't start with kotlinx-coroutines-core >= 1.3.6KT-40073(CoroutineDebugger) Change minimum supported kotlinx.coroutines version to 1.3.8*KT-40172Restored frame variables isn't shown for suspended coroutines
IDE. Gradle Integration
KT-38744No dependency between Androidtestand commonTest source sets with kotlin.mpp.enableGranularSourceSetsMetadata=trueKT-39037'None of the consumable configurations have attributes' in MPP IDE import with transitive project dependency on self
IDE. Gradle. Script
KT-31137IntelliJ would get very slow when editing gradle buildSrc(using the kotlin dsl)KT-36078Gradle Kotlin script context is not reloaded when gradle/wrapper/gradle-wrapper.properties file is changedKT-39317ISE “Calling invokeAndWait from read-action leads to possible deadlock.” on importing simple Gradle-based project in nightly IJ
IDE. Inspections and Intentions
KT-28662Inspection to flag usage of the wrong Transient annotation on Kotlin Serializable classKT-34209Switch default behaviour in 1.4 for insertion (to build script) via quick fix of the compiler option enabling inline classesKT-36131Suggest to add a missing module dependency on an unresolved reference in Kotlin codeKT-37462Add "Add dependency to module" quickfix in multimodule Maven projectKT-39869Add whole project migration usages of kotlin.browser.* & kotlin.dom.* to kotlinx.browser.* & kotlinx.dom.* respectively
IDE. Wizards
KT-40004New Project wizard 1.4+: nohttps://dl.bintray.com/kotlin/kotlinxrepository is added for kotlinx-htmlKT-40037New Project wizard: update Ktor versionKT-40092Wizard: the templates panel on mac OS is too wideKT-40232New Wizard: Android Sdk path doesn't have backslash escaping on WindowsKT-40371New Project Wizard: Frontend Application / Library results in broken run configurationKT-40377New Project Wizard: Frontend Application defines NPM dependencies that are unnecessary with Kotlin 1.4-RC+KT-40378New Project Wizard: Frontend Application, Disabling JavaScript test framework has no effectKT-40407Wizard: do not add stdlib by default for Gradle projects in wizard
JS. Tools
KT-39984Update dukat version in toolchain near to release of 1.4-RC
JavaScript
KT-32186Make sure K/JS Reflection API documentation is correct and fix it.KT-37563K/JS: stacktrace is not captured for exceptions without primary constructor inherited from Exception/ErrorKT-37752Generated typescript incorrect for constructors of derived classesKT-37883KJS: Generated TypeScript uses 'declare' rather than 'export'KT-38771JS: support non-reified type parameters in typeOfKT-39873Update Kotlin JavaScript wrappers due to NON_EXPORTABLE_TYPE diagnostic introductionKT-40126[JS / IR] NPE while compiling interfaces with invoke which is passed as a delegateKT-40216KJS / IR: AssertionError caused by an anonymous object in the dependency project
Libraries
KT-33069StringBuilder common functions- [
KT-35972](https://youtr...
Kotlin 1.4-M3
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-23575Deprecate with replacement and SinceKotlinKT-38652Do not generate optional annotations to class files on JVMKT-38777Hide Throwable.addSuppressed member and prefer extension instead
Performance Improvements
KT-38489Compilation of kotlin html DSL increasingly slowKT-28650Type inference for argument type is very slow if several interfaces with a type parameter is used as an upper bound of a type parameter
Fixes
KT-15971Incorrect bytecode generated when inheriting default arguments not from the first supertypeKT-25290NI: "AssertionError: If original type is SAM type, then candidate should have same type constructor" on out projection of Java classKT-28672Contracts on calls with implicit receiversKT-30279Support non-reified type parameters in typeOfKT-31908NI: CCE on passing lambda to function which accepts vararg SAM interfaceKT-32156New inference issue with genericsKT-32229New inference algorithm not taking into account the upper bound classKT-33455Override equals/hashCode in functional interface wrappersKT-34902AnalyzerException: Argument 1: expected I, but found R for unsigned types in generic data classKT-35075AssertionError: "No resolved call for ..." with conditional function referencesKT-35468Overcome ambiguity between typealias kotlin.Throws and the aliased type kotlin.jvm.ThrowsKT-35494NI: Multiple duplicate error diagnostics (in IDE popup) with NULL_FOR_NONNULL_TYPEKT-35681Wrong common supertype between raw and integer literal type leads to unsound codeKT-35937Error "Declaration has several compatible actuals" on incremental buildKT-36013Functional interface conversion not happens on a value of functional type with smart cast to a relevant functional typeKT-36045Do not depend on the order of lambda arguments to coerce result toUnitKT-36448NI: fix tests after enabling NI in the compilerKT-36706Prohibit functional interface constructor referencesKT-36969Generate @NotNull on instance parameters of Interface$DefaultImpls methodsKT-37058Incorrect overload resolution ambiguity on callable reference in a conditional expression with new inferenceKT-37120[FIR] False UNRESOLVED_REFERENCE for public and protected member functions and properties which are declared in object inner classKT-37149Conversion when generic specified by type argument of SAM typeKT-37249false TYPE_MISMATCH when When-expression branches have try-catch blocksKT-37341NI: Type mismatch with combination of lambda and function referenceKT-37436AME: "Receiver class does not define or inherit an implementation of the resolved method" in runtime on usage of non-abstract method of fun interfaceKT-37510NI infersjava.lang.Voidfrom the expression in a lazy property delegate and throws ClassCastException at runtimeKT-37541SAM conversion with fun interface without a function fails on compiling and IDE analysis in SamAdapterFunctionsScope.getSamConstructor()KT-37574NI: Type mismatch with Kotlin object extending functional type passed as @FunctionalInterface to JavaKT-37630NI: ILT suitability in a call is broken if there are CST calculation and calling function's type parametersKT-37665NI: applicability error due to implicitly inferred Nothing for returning T with expected typeKT-37712No extension receiver in functional interface created with lambdaKT-37715NI: VerifyError: Bad type on operand stack with varargs generic value when type is inferredKT-37721NI: Function reference with vararg parameter treated as array and missing default parameter is rejectedKT-37887NI: Smart casting for Map doesn't work if the variable is already "smart casted"KT-37914NI: broken inference for a casting to subtype function within the common constraint system with this subtypeKT-37952NI: improve lambdas completion through separation the lambdas analysis into several stepsKT-38069Callable reference adaptation should have dependency on API version 1.4KT-38143New type inference fails when calling extension function defined on generic type with type arguments nested too deepKT-38156FIR Metadata generationKT-38197java.lang.OutOfMemoryError: Java heap space: failed reallocation of scalar replaced objectsKT-38259NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER for provideDelegateKT-38337Map delegation fails for inline classesKT-38401FIR: protected effective visibility is handled unpreciselyKT-38416FIR: infinite loop in BB coroutine test 'overrideDefaultArgument.kt'KT-38432FIR: incorrect effective visibility in anonymous objectKT-38434Implement resolution of suspend-conversion on FE only, but give error if suspend conversion is calledKT-38437[FIR] String(CharArray) is resolved to java.lang.String constructor instead of kotlin.text.String pseudo-constructorKT-38439NI: anonymous functions without receiver is allowed if there is an expected type with receiverKT-38473FIR: ConeIntegerLiteralType in signatureKT-38537IllegalArgumentException: "marginPrefix must be non-blank string" with raw strings and space as margin prefix in trimMargin() callKT-38604Implicit suspend conversion on call arguments doesn't work on vararg elementsKT-38680NSME when calling generic interface method with default parameters overriden with inline class type argumentKT-38681Wrong bytecode generated when calling generic interface method with default parameters overriden with primitive type argumentKT-38691NI: overload resolution ambiguity if takeRand() -> R, and pass literal lambda, which returnsRKT-38799False positive USELESS_CAST for lambda parameterKT-38802Generated code crashes by ClassCastException when delegating with inline classKT-38853Backend Internal error: Error type encountered: Unresolved type for nested class used in an annotation argument on an interface methodKT-38890NI: false negative Type mismatch for values with fun keywordKT-39010NI: Regression with false-positive smartcast on var of generic typeKT-39013202, ASM 8: "AnalyzerException: Execution can fall off the end of the code"KT-39260"AssertionError: Unsigned type expected: Int" in rangeKT-39305NEW_INFERENCE_NO_...