v2.0.20-Beta2
版本发布时间: 2024-07-10 18:00:39
JetBrains/kotlin最新发布版本:v1.9.25(2024-07-19 20:52:20)
Changelog
Analysis. API
Fixes
-
KT-65417
K2 IDE: KTOR false positive expect-actual matching error on enum class because of implicit clone() in non-JVM source sets -
KT-68882
Analysis API: RefactorKaSymbol
s -
KT-68689
LL API: support analysis from builtins module -
KT-67775
Analysis API: expose only interfaces/abstract classes for the user surface -
KT-68009
K2: lowering transformers of Compose compiler plugin access AbstractFir2IrLazyFunction modality, which results in null point exception -
KT-68918
collectCallCandidates works incorrectly for parenthesis invoke -
KT-68462
Analysis API: Integrateproject-structure
module intoanalysis-api
andanalysis-api-platform-interface
-
KT-69131
AA: "provideDelegate" operator is not resolved from the delegation reference in FIR implementation -
KT-69055
Analysis API: StabilizeKaScope
s -
KT-68959
Introduce KaSeverity -
KT-68846
Mark KaFirReference and all implementations with internal modifier -
KT-68845
Move KaSymbolBasedReference to resolution package -
KT-68844
Move KaTypeProjection to types package -
KT-65849
K2: Rename 'high-level-api' family of JARs to 'analysis-api' -
KT-62540
Remove uses of TypeInfo.fromString and TypeInfo.createTypeText from Kotlin plugin -
KT-68155
Analysis API: Add PSI validity check toanalyze
-
KT-62936
Analysis API: NativeForwardDeclarationsSymbolProvider is not supported for Kotlin/Native
Analysis. Light Classes
-
KT-68261
SLC: Constructors of sealed classes should be private -
KT-68696
DropDecompiledPsiDeclarationProvider
-related stuff -
KT-68404
SLC: wrong binary resolution to declaration with@JvmName
Backend. Native. Debug
-
KT-67567
Native: after updating to LLVM 16 lldb hangs when smooth stepping
Backend. Wasm
-
KT-68828
Wasm test failure. expect-actual. private constructor in expect
Compiler
New Features
-
KT-58310
Consider non-functional type constraints for type variable which is an expected type for lambda argument -
KT-57872
Improve "Public-API inline function cannot access non-public-API" check
Fixes
-
KT-65546
K2. implement extended checker for unused anonymous parameter in lambda -
KT-60445
K2/Java: investigate possible symbol clash while enhancing Java class type parameter bounds -
KT-68358
@EnhancedNullability
is missing on value parameter type after inheritance by delegation with strict JSpecify enabled -
KT-67791
False negative "Synchronizing by Meters is forbidden" with inline value classes -
KT-69495
k2: inconsistent output of unsigned number in string templates -
KT-67693
Implement checkers for K1 compiler which will check the usage of K2 new features and report that they are not supported in K1 compiler -
KT-44139
Don't report overload resolution ambiguities if arguments contain an error type -
KT-69282
K2: equality of unsigned types with nullability works incorrectly -
KT-69619
K2. JAVA_TYPE_MISMATCH when Kotlin out generic type used in Java -
KT-68996
K2: "Not enough information to infer type argument" caused by typealias annotation with fixed generic argument -
KT-69563
trying to call.source
onFirPackageFragmentDescriptor
results in exception -
KT-69611
Internal annotation FlexibleArrayElementVariance is written to output jar -
KT-69463
K2: false negative SUPER_CALL_WITH_DEFAULT_PARAMETERS with expect/actual declarations -
KT-68556
K2: false negative PROPERTY_WITH_NO_TYPE_NO_INITIALIZER on uninitialized property without type -
KT-68997
K2: "No accessor found" for an inline value class when query the value of a delegated class by reflection -
KT-68724
K2: "ABSTRACT_MEMBER_NOT_IMPLEMENTED" caused by open modifier on interface -
KT-68667
K2: Compiler hangs on mapNotNull and elvis inside lambda -
KT-68747
K2: Long compilation time because of constraint solving when using typealias in different modules -
KT-68940
K2: "IllegalArgumentException: All variables should be fixed to something" -
KT-69182
K2: OptIn on enum companion blocks enum constants -
KT-69191
K2: "Unresolved reference" caused by nested data objects -
KT-68797
K2 / Native: "java.lang.IllegalStateException: FIELD" caused by enabled caching -
KT-69569
Wrong paths when one type has multiple annotated arguments -
KT-63871
K2: different value ofisNotDefault
flag for property inherited from delegate -
KT-63828
K2: Missingsignature
metadata for accessors of properties inherited from delegate -
KT-68669
K2: Generate inherited delegated members after actualization -
KT-69402
FirSupertypeResolverVisitor: ConcurrentModificationException -
KT-68449
K2: "when" expression returns Unit -
KT-67072
K2: inconsistent stability of open vals on receivers of final type -
KT-68570
K2: "Unresolved reference" in call with lambda argument and nested lambda argument -
KT-69476
False negative NO_ELSE_IN_WHEN on when over intersection type with expect enum/sealed class -
KT-67069
K2: Delegated member calls interface method instead of fake override -
KT-63864
K2: Missing abbreviated type in metadata -
KT-69421
K2: Resolve changed from delegated function to java default function -
KT-69392
K2: "UNSAFE_CALL": when with some variable subjects does not smartcast the variable -
KT-69159
K2: KotlinNothingValueException in Exposed -
KT-69053
K2: Unsupported intersection overrides for fields -
KT-69227
K2: "Argument type mismatch" caused by generic typealias and upper bound -
KT-31371
NOT_YET_SUPPORTED_IN_INLINE: incorrect error message for local inline function -
KT-49473
PROTECTED_CALL_FROM_PUBLIC_INLINE_ERROR: specialize error message for 'inline' property -
KT-49474
NON_PUBLIC_CALL_FROM_PUBLIC_INLINE: specialize error message for 'inline' property -
KT-49503
SUPER_CALL_FROM_PUBLIC_INLINE_ERROR: specialize error message for 'inline' property -
KT-11302
On inapplicable '@JvmStatic
' annotation, highlight only the annotation, not the function signature -
KT-59510
K2: do not render annotations in the deprecation diagnostic -
KT-68532
"This code uses error suppression for 'INAPPLICABLE_JVM_NAME'. While it might compile and work, the compiler behavior is UNSPECIFIED and WON'T BE PRESERVED" -
KT-68859
K2: unable to suppress only "JAVA_MODULE_DOES_NOT_EXPORT_PACKAGE" -
KT-68623
K2: "Only safe or null-asserted calls are allowed" on safe call -
KT-68364
JVM: ISE "Bad exception handler end" on a non-local break/continue inside try with finally -
KT-68469
[K2] MISSING_DEPENDENCY_CLASS caused by redundant@file
:JvmName -
KT-68999
K2: Unify the style of FIR generator with IR and SIR tree-generators -
KT-66061
Kotlin/Native - building shared module for iOS - Argument list too long -
KT-67804
removeFirst and removeLast return type with Java 21 -
KT-49420
Suspicious behaviour of frontend in case of DefinitelyNotNull type overload -
KT-59752
K2: "Conflicting overloads" if function with same signature added to different contexts -
KT-68618
K1: Unresolved reference for qualified this in implicit type -
KT-25341
NOT_YET_SUPPORTED_IN_INLINE reported over anonymous object border -
KT-69044
Destructuring declaration shouldn't be possible in declaration in when -
KT-69028
K2:FirJvmActualizingBuiltinSymbolProvider
returnsnull
on builtins declarations if common source-set is not presented -
KT-67119
Migration warning from context receivers to context parameters -
KT-15704
Rethink usage of term "type annotation" in error messages -
KT-68970
K2. Argument type mismatch caused by out projection in inferred type from if - else -
KT-68727
K2: "Null argument in ExpressionCodegen for parameter VALUE_PARAMETER" caused by an enum class with default parameter in a different module -
KT-68626
K2: "Conflicting Overloads" for function if inherited from generic type -
KT-68800
K2: DeleteConeAttributes.plus
method -
KT-59389
K2: Missing AMBIGUOUS_LABEL -
KT-68803
K2: Smart cast fails with "Unresolved reference" when@Suppress
("UNCHECKED_CAST") used in statement -
KT-68968
K2: Missing ILLEGAL_SUSPEND_FUNCTION_CALL diagnostic in initialization code of a local class inside suspend function -
KT-68489
K2: WRONG_ANNOTATION_TARGET with Java and Kotlin@Target
annotation positions -
KT-68517
"IrSimpleFunctionSymbolImpl is unbound" for actual class containing non-actual functions -
KT-59678
K2: InvestigateConeKotlinType.unCapture()
-
KT-64193
K2: No smartcast with two boolean expressions in a row -
KT-69058
K2: Java-defined property annotations not persisted -
KT-69027
K2: InitializeFirStdlibBuiltinSyntheticFunctionInterfaceProvider
in library session -
KT-62818
K2: improve VAR_OVERRIDDEN_BY_VAL diagnostic message -
KT-68214
Rename TypeApproximatorConfiguration properties for clarity -
KT-64515
K2 IDE: [NEW_INFERENCE_ERROR] in a build.gradle.kts script while applying "jvm-test-suite" plugin and then configuring targets for test suites -
KT-68093
Implement deprecation of smartcasts on class-delegated properties -
KT-67270
Native: report more performance metrics from the compiler -
KT-68621
DATA_CLASS_INVISIBLE_COPY_USAGE false negative for inline fun -
KT-68575
K2:@ParameterName
annotation is not erased when inferring the type ofit
in lambdas -
KT-69000
Can't render constructor of intersection type -
KT-68401
K2: "IllegalAccessError: failed to access class" caused by package private super Java type, when inferencing a common super type of if or when branches on JVM -
KT-68806
K/Wasm RuntimeError: unreachable on Sequence::toList -
KT-68849
K2: "ClassCastException: cannot be cast to kotlin.jvm.functions.Function2" caused by passing lambda to SAM constructor results -
KT-68455
K2: False negative UPPER_BOUND_VIOLATED_BASED_ON_JAVA_ANNOTATIONS -
KT-61744
Native: -Xsave-llvm-ir-after fails to check errors from LLVMPrintModuleToFile -
KT-68874
Types with different captured types as type arguments are rendered incorrectly -
KT-67103
Support AbbreviatedTypeAttribute for aliased types from the source code -
KT-65038
K2: Type alias from indirect dependency causesMISSING_DEPENDENCY_CLASS
error -
KT-63921
K2: different representation of recursive type aliases -
KT-68538
KJS/K2: usingwhile
withbreak
inside inline lambdas leads to an endless cycle -
KT-68679
K2: "Override has incorrect nullability in its signature compared to the overridden declaration" caused by subclass of Android HashMap -
KT-68734
K2: enum class in KMP: Expect declarationMMKVLogLevel
is incompatible with actualMMKVLogLevel
because modality is different -
KT-68820
K2: "Unresolved reference" on calling function with "contract" name -
KT-68230
K2: FirMissingDependencyClassChecker: Not supported: ConeFlexibleType -
KT-68531
K2: False-negative error on assignment to enum entry -
KT-68571
K2: "IllegalStateException: Fake override should have at least one overridden descriptor" caused by exceptions and when statement -
KT-68523
K2: FileAnalysisException when using Definitely non-nullable types -
KT-68339
K2: "Enum entry * is uninitialized here" caused by lazy property with enum inwhen
expression -
KT-68678
K2: Drop usingFirBuiltinSymbolProvider
while compiling JVM stdlib -
KT-68585
Implement new rules for CFA about enum entries -
KT-68110
K2: "Java type mismatch" caused by spring.Nullable -
KT-68613
K2: False positiveCONFLICTING_PROJECTION
after fixing KT-67764 -
KT-67764
K2: False negative: Projection problem is not reported inis
expression -
KT-68542
K2: Fix referecing to@ExtensionFunctionType
if it's declared in source -
KT-68188
K2: Properly support FunctionN creation for stdlib compilation -
KT-67946
K2: Crash on red code:Instead use FirErrorTypeRef for ERROR CLASS: Cannot infer argument for type parameter T
-
KT-68617
K2: Secondary constructors in a sealed class have private visibility instead of protected in the generated IR -
KT-63920
K2: Private secondary sealed class constructor is private in metadata, but protected in K1 -
KT-68207
K2: Investigate if losing ConeIntersectionType.upperBoundForApproximation during approximation leads to any issues -
KT-51433
FE 1.0: implement warnings about label resolve changes
Compose compiler
New features
-
192e556
Strong skipping is now enabled by default -
842a9e8
Add support for default parameters in abstract and open@Composable
functionsb/165812010
Fixes
-
e207b05
Fixes group generation for if statements when nonSkippingGroupOptimization is enabledb/346821372
-
f64fc3a
FixesendToMarker
generation in early return from inline lambdas that caused start/end imbalanceb/346808602
-
d6ac8a5
Stop memoizing lambdas with captured property delegatesb/342557697
-
f38d5a3
Stop capturing parameter meta across crossinline boundaryb/343801379
-
770fe8d
Propagate annotations from inferred function types when serializingb/345261077
-
3c67cda
Fix memoization of captureless lambdas when K2 compiler is usedb/340582180
-
3281e53
Allow memoizing lambdas in composable inline functionsb/340606661
IR. Actualizer
-
KT-68830
Compiler crash on missing actual class -
KT-69024
K2: Children of expect annotation with@OptionalExpectation
should be actualized -
KT-68742
Allow expect protected to Java protected actualization -
KT-66436
K2. Actualizing modCount property with a field in AbstractMutableList -
KT-68741
Support actualization of AbstractMutableList.modCount -
KT-68801
Crash on access of fake override of function actualized by fake override
IR. Inlining
-
KT-68100
Run IR validation in the beginning and the end of the common prefix -
KT-69171
Introduce a temporary-X
CLI parameter that enables double-inlining -
KT-69006
Enable IR visibility checks after IR inlining -
KT-69183
IR inlining: properly handle defaults that depends on previous value parameters -
KT-68558
MoveInlineCallableReferenceToLambdaPhase
intoir.inline
module
IR. Tree
-
KT-68784
Support validating visibility of referenced declarations in IrValidator -
KT-68174
Delete the IrMessageLogger interface -
KT-67082
Introduce attributes on IrElement -
KT-67695
ForLoopsLowering fails to handle a loop over an imprecise typed iterable -
KT-68716
DeepCopyIrTreeWithSymbols.visitConst
should remap const type
JavaScript
-
KT-66898
KJS: Reserved keywords not escaped when-Xir-generate-inline-anonymous-functions
is enabled -
KT-69400
Use correct type for references on local functions when transforming them into lambda -
KT-68554
Legalize marker interface as parent for JSO (interface marked with@JsPlainObject
) -
KT-68891
@JsPlainObject
fails to compile when encountering reserved keywords as interface properties -
KT-69023
KJS / IR:globalThis
is mandatory, breaking older browsers support -
KT-68641
KJS: 'export was not found' with per-file mode on case-insensitive filesystem -
KT-68632
K2: allow JS_NAME_CLASH suppression -
KT-68620
[wasm] [js]
Default param in inner class method fails if we are referring generic extension property
Klibs
-
KT-66605
[KLIB] Excessive creation ofBaseKotlinLibrary
during resolving libs -
KT-68824
API 4 ABI: Don't show sealed class constructors
Language Design
-
KT-68636
Incorrect private_to_this visibility for data class with a private constructor
Libraries
-
KT-31880
UUID functionality to fix Java bugs as well as extend it -
KT-60787
Cannot ignore alpha when formatting with HexFormat -
KT-66129
Minor issues with HexFormat -
KT-57998
implement Base64.withoutPadding -
KT-67511
provide equals() and hashCode() implementations for kotlinx.metadata.KmType -
KT-68240
stdlib: proper expects for internal API used in intermediate shared source sets -
KT-68840
atomicfu-runtime: annotate some internal functions with@PublishedApi
-
KT-68839
Annotatekotlin.js.VOID
property with@PublishedApi
Native
-
KT-69206
Native: updating to LLVM 16 breaks debugging in lldb on Linux -
KT-68640
Native: updating to LLVM 16 changes behavior ofused
attribute in C/C++ code -
KT-58097
Kotlin/Native: improve the error message if Xcode is not properly configured
Native. ObjC Export
-
KT-57496
linkReleaseFrameworkIosArm64: e: Compilation failed: An operation is not implemented
Native. Runtime. Memory
-
KT-68871
Native: Unexpected barriers phase during STW: weak-processing
Native. Swift Export
-
KT-69469
Exporting object twice causing crash -
KT-69251
Get rid of context receivers from ./native/.../lazyWithSessions.kt -
KT-68865
Move config into test-directives
Native. Testing
-
KT-69235
Incorrect handling of friend dependencies in Native test infra -
KT-67436
Native: support CLI tests
Reflection
-
KT-69433
KotlinReflectionInternalError on non-reified type parameter in typeOf inside an inline lambda -
KT-68675
K2: KotlinReflectionInternalError on non-reified type parameter in typeOf inside a lambda
Tools. Build Tools API
-
KT-68555
BTA test infra: top level declarations are invisible across modules
Tools. CLI
-
KT-68838
OutOfMemory when compiling in CLI -
KT-68743
Extract common CLI arguments for all KLIB-based backends -
KT-68450
CLI: errors related to module-info are reported even if there are no Kotlin source files
Tools. CLI. Native
-
KT-66952
Native: konanc fails when KONAN_HOME is under path with spaces
Tools. Commonizer
-
KT-68835
Command line length overflow on Linux/Windows while invoking commonizer via :commonizeDistribution
Tools. Compiler Plugins
-
KT-69401
Kotlin power assert plugin doesn't work correctly with safe cast operator -
KT-69290
PowerAssert: implicit receivers included in power-assert generated diagram -
KT-68511
Power Assert kotlinx.assertEquals message display problem -
KT-68807
Power-Assert crashes the Kotlin compiler when if expression used as assertion parameter -
KT-68557
K2. Supertypes resolution of KJK hierarchy fails in presence of allopen plugin
Tools. Compiler plugins. Serialization
-
KT-68931
JS/Native + serialization: partial linkage error -
KT-69039
FIR: Implement IDE-only checker for kotlinx.serialization compiler plugin to report IDE-only diagnostics -
KT-68752
Serializable annotation on Java class is not taken into account in K2 checker
Tools. Daemon
-
KT-68297
KGP 2.0 regression: JAVA_TOOL_OPTIONS is not considered in Kotlin daemon creation
Tools. Fleet. ObjC Export
-
KT-68887
ObjCExport: K1 text fixture@Deprecated
support -
KT-68841
ObjCExport:@Deprecated
support -
KT-68826
ObjCExport: SerializersModuleBuilder
Tools. Gradle
New Features
-
KT-68651
Compose: provide a single place in extension to configure all compose flags
Performance Improvements
-
KT-61861
Gradle: Kotlin compilations depend on packed artifacts
Fixes
-
KT-69330
KotlinCompile friendPathsSet property is racy due causing build cache invalidation -
KT-69444
Don't warn about missing Compose Compiler Gradle plugin in some cases -
KT-65271
Gradle: "Mutating dependency DefaultExternalModuleDependency after it has been finalized has been deprecated " with gradle 8.6-rc-3 -
KT-69026
Mark AGP 8.5.0 as compatible with KGP -
KT-67822
Deprecate JVM history files based incremental compilation -
KT-67771
Compatibility with Gradle 8.8 release -
KT-65820
Compatibility with Gradle 8.7 release -
KT-64378
Compatibility with Gradle 8.6 release -
KT-68661
Move ExperimentalWasmDsl to kotlin-gradle-plugin-annotations -
KT-69291
Compose Gradle plugin: Enable strong skipping by default -
KT-65528
Migrate rest of Gradle integration tests to new Test DSL -
KT-68306
Project isolation for FUS statistics: Cannot access project ':' from project ':app' at org.jetbrains.kotlin.gradle.report.BuildMetricsService$ Companion.initBuildScanExtensionHolder -
KT-67395
Add new plugins to collector kotlin gradle performance -
KT-67766
Build against Gradle API 8.7 -
KT-67890
Compile against Gradle 8.8 API artifact -
KT-68773
Kotlin 2.0.0 with Gradle 8.8: ConcurrentModificationException on BuildFusService configurationMetrics -
KT-67889
Run tests against Gradle 8.8 release -
KT-69078
Gradle: Add option to disable FUS Service -
KT-68308
Project isolation for FUS statistics: An error is thrown at org.gradle.configurationcache.ProblemReportingCrossProjectModelAccess$ProblemReportingProject.getLayout -
KT-58280
org.jetbrains.kotlin.jvm Gradle plugin contributes build directories to the test compile classpath
Tools. Gradle. Kapt
-
KT-61928
Clarify parameter types in KaptArguments and KaptJavacOption
Tools. Gradle. Multiplatform
-
KT-69310
w: KLIB resolver: The same 'unique_name=...' found in more than one library for diamond source set structures -
KT-66568
w: KLIB resolver: The same 'unique_name=...' found in more than one library -
KT-69406
Deprecate combinations of KMP plugin with some Gradle Java plugins -
KT-66209
Accessing the source sets by name is confusing -
KT-56566
Consider pre-generating DSL accessors for source sets with names corresponding to the default target hierarchy -
KT-69129
KGP: stdlib version alignment for JS and Wasm -
KT-62368
Kotlin 1.9.X fails to detect kotlin.test.Test annotation reference on commonTest source set when targeting JVM+Android -
KT-67110
Usage of BuildOperationExecutor.getCurrentOpeartion internal Gradle API -
KT-68248
kotlin multiplatform project fail to build on Fedora with corretto
Tools. Gradle. Native
-
KT-68638
KGP 2.0 breaks native test with api dependencies and configuration cache
Tools. Kapt
-
KT-68171
K2KAPT: boxed return types in overridden methods changed to primitives -
KT-68145
K2 KAPT: missing $annotations methods for const properties and private properties without accessors
Tools. Scripts
-
KT-69296
scripting dependency resolution does not authenticate towards maven mirrors -
KT-68681
K2 / CLI / Script: "NullPointerException: getService(...) must not be null" caused by@DependsOn
Tools. Wasm
-
KT-69245
K/Wasm: Remove warning of working-in-progress -
KT-69154
K/Wasm: wasmJsBrowserProductionRun flaky crash with "WebAssembly.instantiate(): Import ... function import requires a callable" -
KT-67980
Wasm: Incorrect "Please choose a JavaScript environment to build distributions and run tests" when WASM is not configured
1、 kotlin-compiler-2.0.20-Beta2.zip 82.08MB
2、 kotlin-compiler-2.0.20-Beta2.zip.sha256 64B
3、 kotlin-compiler-2.0.20-Beta2.spdx.json 33.15KB
4、 kotlin-native-prebuilt-linux-x86_64-2.0.20-Beta2.tar.gz 181.24MB
5、 kotlin-native-prebuilt-linux-x86_64-2.0.20-Beta2.tar.gz.sha256 64B
6、 kotlin-native-prebuilt-linux-x86_64-2.0.20-Beta2.spdx.json 426B
7、 kotlin-native-prebuilt-macos-aarch64-2.0.20-Beta2.tar.gz 308.81MB
8、 kotlin-native-prebuilt-macos-aarch64-2.0.20-Beta2.tar.gz.sha256 64B
9、 kotlin-native-prebuilt-macos-aarch64-2.0.20-Beta2.spdx.json 426B
10、 kotlin-native-prebuilt-macos-x86_64-2.0.20-Beta2.tar.gz 309.92MB
11、 kotlin-native-prebuilt-macos-x86_64-2.0.20-Beta2.tar.gz.sha256 64B
12、 kotlin-native-prebuilt-macos-x86_64-2.0.20-Beta2.spdx.json 426B
13、 kotlin-native-prebuilt-windows-x86_64-2.0.20-Beta2.zip 174.29MB
14、 kotlin-native-prebuilt-windows-x86_64-2.0.20-Beta2.zip.sha256 64B
15、 kotlin-native-prebuilt-windows-x86_64-2.0.20-Beta2.spdx.json 437B
16、 maven-2.0.20-Beta2-sha256.txt 150.79KB