Learn how to install Kotlin 1.6.0-RC.
Changelog
Compiler
Fixes
KT-49157
Tail-call optimization miss with cast to type parameterKT-48778
-Xtype-enhancement-improvements-strict-mode not respecting@NonNull
annotation for property accesses?KT-46437
NI: "Throwable: Resolution error of this type shouldn't occur for resolve if as a call" caused by reflectively accessing private property inside "if/else" or "when" expressionKT-48590
IllegalArgumentException: ClassicTypeSystemContext couldn't handle: Captured(*) reified type class referenceKT-48261
"overload resolution ambiguity" for JSpecify+jsr305-annotated Java List implementationKT-48633
Can't infer builder inference's type argument across local classKT-49136
JVM IR: NPE with safe call chain and property set to null by reflectionKT-48912
K/NSymbol with IrSimpleFunctionSymbolImpl is unbound
andJS Validation failed in file shaders.kt
KT-48928
Prohibit using old JVM backend with language version >= 1.6KT-41978
NI: Kotlin fails to infer type of function argumentKT-48732
JVM / IR: MalformedParameterizedTypeException is thrown when a Spring Bean of suspending function type is registeredKT-47841
Turning LV to 1.6 breaks some diagnostics based on jspecify annotationsKT-48498
JVM IR: IllegalAccessError with inline function call and property delegation from different moduleKT-48319
JVM / IR: AssertionError: FUN caused by suspend lambda inside anonymous functionKT-48835
Psi2ir: vararg parameter value is lost when translating adapted function reference to base class memberKT-46908
JVM / IR: do not wrap fun interface implementation into another SAM adapter if it inherits from a functional typeKT-48927
JVM IR: "VerifyError: Bad invokespecial instruction: current class isn't assignable to reference class" when up-casting and read a base class's private property that has a custom getter in the base class's public functionKT-48992
Postpone migration to new operator resolution scheme for integer literalsKT-48290
Type bounds warning based on Java annotations not issues with language level 1.6KT-47920
There is no warning on violated nullability of type parameter in accordance with java nullability annotationKT-48851
Keep using warn mode for jspecify in 1.6KT-46829
IR: NullPointerException caused by setting scoped generic extension varKT-44843
PSI2IR: "org.jetbrains.kotlin.psi2ir.generators.ErrorExpressionException: null: KtCallExpression" with delegate who has name or parameter with the same name as a propertyKT-42972
Forbid protected constructor calls from public inline functionsKT-45378
Prohibit super calls in public-api inline functionsKT-48515
JSpecify: If a class has a@Nullable
type-parameter bound, Kotlin should still treat unbounded wildcards like platform typesKT-48825
JVM IR: NPE with delegated property "by this" to base classKT-48535
Make EXPERIMENTAL_ANNOTATION_ON_OVERRIDE warningKT-48478
JVM IR: Coroutines 1.5.1 + Kotlin 1.5.30 - ClassCastException: CompletedContinuation cannot be cast to DispatchedContinuationKT-48671
JVM / IR: "AssertionError: Primitive array expected: CLASS IR_EXTERNAL_DECLARATION_STUB CLASS"KT-46181
JVM IR: private @JvmStatic function is generated in the outer class instead of companion object, which breaks existing calls via JNI or reflection (e.g. JUnit @MethodSource)KT-48736
JVM IR: assert in SyntheticAccessorLowering when inline function attempts to access package-private field from JavaKT-20542
IllegalAccessError on calling private function with default parameters from internal inline function used in another packageKT-48331
JVM / IR: "VerifyError: Bad access to protected data in invokevirtual" when a sealed class uses another sealed class in its same hierarchy level as a constructor parameterKT-48659
JVM / IR: Referential equality returns true for different instancesKT-48606
[1.6] Instantiated annotations do not implement hashCode correctly/consistentlyKT-48316
"No value passed for parameter" regression with Java annotation default values with JSR-305KT-48391
JVM / IR: "AssertionError: SyntheticAccessorLowering should not attempt to modify other files!" caused by class which inherits interface which has default function with default argument from companion const val
IDE. Gradle Integration
KT-46273
MPP: Don't fail import for case of missed platform in source set structureKT-48823
Improve error reporting on import when configuration phase in Gradle failedKT-48504
MPP: UninitializedPropertyAccessException on import if new hierarchical mpp flag conflicts with other flags
Libraries
New Features
Performance Improvements
KT-45438
Remove brittle ?contains? optimization in minus/removeAll/retainAll
Fixes
KT-47304
Random#nextLong generates value outside provided rangeKT-48999
Align behavior of some JS functions with their JVM counterpartKT-28378
Different behavior of Regex replace function in Java and JS when replacement string contains group referenceKT-46229
Bring back Duration factory extension propertiesKT-46243
Typography.leftGuillemete and Typography.rightGuillemete are named inconsistent with standardKT-46101
Review deprecations in stdlib for 1.6KT-48456
Introduce Common (multi-platform) readln() and readlnOrNull() top-level functionsKT-38754
Deprecate appendln in favor of appendLine
Native
KT-48807
Cinterop: cannot create bindings for a framework when Xcode 13 RC is installed
Tools. CLI
KT-49007
Support three previous API versions
Tools. Compiler Plugins
KT-48842
Compiler crash: Symbol with IrFieldSymbolImpl is unboundKT-48117
Kotlin AllOpen Plugin should open private methods
Tools. Gradle
KT-48745
JVM target compatibility check should be disabled when Java sources are emptyKT-49066
Setting kotlinOptions.modulePath in an android project breaks incremental compilationKT-48847
Remove deprecated kotlin options marked for removal after 1.5KT-48245
KGP makes compileOnly configuration resolvableKT-48768
Misleading 'jdkHome' deprecation message
Tools. Gradle. Multiplatform
KT-48919
Gradle multiplatform plugin 1.6.0-M1 does not accept apiVersion = "1.7"
Tools. Scripts
KT-49012
Compiling .kts script with inner class declaration fails with Backend Internal Error caused by AE: "Local class constructor can't have dispatch receiver"
Tools. kapt
KT-45545
Kapt is not compatible with JDK 16+KT-47934
KaptJavaLog is unable to map stub back to the kotlin source
File | Sha256 |
---|---|
kotlin-compiler-1.6.0-M1.zip | abf930acf14518cf0f9d18c35b2a2ecf00048a7c62aa69a98e4f6367704f21a3 |
kotlin-native-linux-x86_64-1.6.0-RC.tar.gz | a4e6de9e010d37210eb332e6b83c005209ec5a8e8111106a4ee06e1bae0050cc |
kotlin-native-macos-x86_64-1.6.0-RC.tar.gz | dbd749ec954c28ff8fa4e1842b89b8edb6c583262a57074fdcc30aa767d3218e |
kotlin-native-macos-aarch64-1.6.0-RC.tar.gz | 7d95b043fca7f41a265ff9c85d329c09598d4abc7f8f1f8d3105fba73bee7e02 |
kotlin-native-windows-x86_64-1.6.0-RC.zip | 14483ea6dab096100d650fa930ee479679cb6b5c6ab39f719982a841d1cc325c |