Skip to content

Commit 2dff46d

Browse files
committed
fix: last minor finishing touches
1 parent 481e7a0 commit 2dff46d

File tree

1 file changed

+27
-28
lines changed

1 file changed

+27
-28
lines changed

docs/topics/whatsnew/whatsnew-eap.md

Lines changed: 27 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ _[Released: %kotlinEapReleaseDate%](eap.md#build-details)_
1313

1414
The Kotlin %kotlinEapVersion% release is out! Here are some details of this EAP release:
1515

16-
* **Kotlin compiler plugin**: [Lombok is Alpha](#lombok-is-now-alpha) and [improved JPA support in the `kotlin.plugin.jpa` plugin](#improved-jpa-support-in-the-kotlin-plugin-jpa-plugin)
16+
* **Kotlin compiler plugins**: [Lombok is Alpha](#lombok-is-now-alpha) and [improved JPA support in the `kotlin.plugin.jpa` plugin](#improved-jpa-support-in-the-kotlin-plugin-jpa-plugin)
1717
* **Kotlin/Native**: [New interoperability mode for C and Objective-C libraries](#new-interoperability-mode-for-c-or-objective-c-libraries) and [concurrent marking in the garbage collector is enabled by default](#default-concurrent-marking-in-garbage-collector)
1818
* **Gradle**: [Compatibility with Gradle 9.3.0](#compatibility-with-gradle-9-3-0) and [Kotlin/JVM compilation uses BTA by default](#kotlin-jvm-compilation-uses-build-tools-api-by-default)
1919
* **Maven**: [Simplified setup for Kotlin projects](#maven-simplified-setup-for-kotlin-projects)
@@ -93,7 +93,6 @@ To address this and other issues, the Kotlin team has been revising the interope
9393

9494
```kotlin
9595
kotlin {
96-
9796
targets.withType<org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget>().configureEach {
9897
compilations.configureEach {
9998
cinterops.configureEach {
@@ -147,32 +146,6 @@ kotlin.native.binary.gc=pmcs
147146

148147
Report any problems to our issue tracker [YouTrack](https://kotl.in/issue).
149148

150-
## Standard library: New API for creating immutable copies of `Map.Entry`
151-
<primary-label ref="experimental-opt-in"/>
152-
153-
Kotlin %kotlinEapVersion% introduces the `Map.Entry.copy()` extension function for creating an immutable copy of a [`Map.Entry`](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/-entry/).
154-
This function allows you to reuse entries obtained from [`Map.entries`](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/entries.html) after modifying the map by copying them first.
155-
156-
`Map.Entry.copy()` is [Experimental](components-stability.md#stability-levels-explained). To opt in, use the `@OptIn(ExperimentalStdlibApi::class)` annotation or the compiler option `-opt-in=kotlin.ExperimentalStdlibApi`.
157-
158-
Here's an example of using `Map.Entry.copy()` to remove entries from a mutable map:
159-
160-
```kotlin
161-
@OptIn(ExperimentalStdlibApi::class)
162-
fun main() {
163-
val map = mutableMapOf(1 to 1, 2 to 2, 3 to 3, 4 to 4)
164-
165-
val toRemove = map.entries
166-
.filter { it.key % 2 == 0 }
167-
.map { it.copy() }
168-
169-
map.entries.removeAll(toRemove)
170-
171-
println("map = $map")
172-
// map = {1=1, 3=3}
173-
}
174-
```
175-
176149
## Gradle
177150

178151
Kotlin %kotlinEapVersion% is compatible with new versions of Gradle and includes changes to Kotlin/JVM compilation in the Kotlin Gradle plugin.
@@ -234,3 +207,29 @@ You can also opt out of the automatic addition of Kotlin's standard library. For
234207
```
235208

236209
For more information on Maven configuration in Kotlin projects, see [Configure a Maven project](maven-configure-project.md).
210+
211+
## Standard library: New API for creating immutable copies of `Map.Entry`
212+
<primary-label ref="experimental-opt-in"/>
213+
214+
Kotlin %kotlinEapVersion% introduces the `Map.Entry.copy()` extension function for creating an immutable copy of a [`Map.Entry`](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/-entry/).
215+
This function allows you to reuse entries obtained from [`Map.entries`](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/entries.html) after modifying the map by copying them first.
216+
217+
`Map.Entry.copy()` is [Experimental](components-stability.md#stability-levels-explained). To opt in, use the `@OptIn(ExperimentalStdlibApi::class)` annotation or the compiler option `-opt-in=kotlin.ExperimentalStdlibApi`.
218+
219+
Here's an example of using `Map.Entry.copy()` to remove entries from a mutable map:
220+
221+
```kotlin
222+
@OptIn(ExperimentalStdlibApi::class)
223+
fun main() {
224+
val map = mutableMapOf(1 to 1, 2 to 2, 3 to 3, 4 to 4)
225+
226+
val toRemove = map.entries
227+
.filter { it.key % 2 == 0 }
228+
.map { it.copy() }
229+
230+
map.entries.removeAll(toRemove)
231+
232+
println("map = $map")
233+
// map = {1=1, 3=3}
234+
}
235+
```

0 commit comments

Comments
 (0)