Skip to content

Commit a962757

Browse files
committed
fix for review comment
1 parent bf9349a commit a962757

File tree

3 files changed

+15
-16
lines changed

3 files changed

+15
-16
lines changed

docs/topics/annotations.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Additional attributes of the annotation can be specified by annotating the annot
2121

2222
```kotlin
2323
@Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION,
24-
AnnotationTarget.TYPE_PARAMETER, AnnotationTarget.VALUE_PARAMETER,
24+
AnnotationTarget.TYPE_PARAMETER, AnnotationTarget.VALUE_PARAMETER,
2525
AnnotationTarget.EXPRESSION)
2626
@Retention(AnnotationRetention.SOURCE)
2727
@MustBeDocumented
@@ -105,7 +105,7 @@ annotation class Ann(val arg1: KClass<*>, val arg2: KClass<out Any>)
105105
## Instantiation
106106

107107
In Java, an annotation type is a form of an interface, so you can implement it and use an instance.
108-
As an alternative to this mechanism, Kotlin lets you call a constructor of an annotation class in arbitrary code
108+
As an alternative to this mechanism, Kotlin lets you call a constructor of an annotation class in arbitrary code
109109
and similarly use the resulting instance.
110110

111111
```kotlin
@@ -181,7 +181,7 @@ The full list of supported use-site targets is:
181181
```kotlin
182182
fun @receiver:Fancy String.myExtension() { ... }
183183
```
184-
184+
185185
* `param` (constructor parameter)
186186
* `setparam` (property setter parameter)
187187
* `delegate` (the field storing the delegate instance for a delegated property)
@@ -399,7 +399,7 @@ public @interface AnnWithArrayValue {
399399
@AnnWithArrayValue("abc", "foo", "bar") class C
400400
```
401401

402-
For other arguments that have an array type, you need to use the array literal syntax or
402+
For other arguments that have an array type, you need to use the array literal syntax or
403403
`arrayOf(...)`:
404404

405405
``` java
@@ -410,7 +410,7 @@ public @interface AnnWithArrayMethod {
410410
```
411411

412412
```kotlin
413-
@AnnWithArrayMethod(names = ["abc", "foo", "bar"])
413+
@AnnWithArrayMethod(names = ["abc", "foo", "bar"])
414414
class C
415415
```
416416

docs/topics/gradle/gradle-configure-project.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ In the following table, there are the minimum and maximum **fully supported** ve
6363
| 1.7.0–1.7.10 | 6.7.1–7.0.2 | 3.4.3–7.0.2 |
6464
| 1.6.20–1.6.21 | 6.1.1–7.0.2 | 3.4.3–7.0.2 |
6565

66-
> Kotlin 2.0.20–2.0.21 and Kotlin 2.1.0–2.1.10 are fully compatible with Gradle up to 8.6.
66+
> *Kotlin 2.0.20–2.0.21 and Kotlin 2.1.0–2.1.10 are fully compatible with Gradle up to 8.6.
6767
> Gradle versions 8.7–8.10 are also supported, with only one exception: If you use the Kotlin Multiplatform Gradle plugin,
6868
> you may see deprecation warnings in your multiplatform projects calling the `withJava()` function in the JVM target.
6969
> For more information, see [Java source sets created by default](https://www.jetbrains.com/help/kotlin-multiplatform-dev/multiplatform-compatibility-guide.html#java-source-sets-created-by-default).

docs/topics/tour/kotlin-tour-intermediate-classes-interfaces.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -295,21 +295,20 @@ class Circle : Drawable {
295295
override fun draw() {
296296
TODO("An example implementation")
297297
}
298-
298+
299299
override fun resize() {
300300
TODO("An example implementation")
301301
}
302-
303-
override val color = null
302+
override val color = null
304303
}
305304
```
306305

307-
If you wanted to create a new class which implements the `Drawable` interface, and have the same behavior with `Circle`
308-
class **except** for the value of the `color` property, you still need to add implementations for each member function
309-
of the `Drawable` interface:
306+
If you wanted to create a child class of the `Circle` class which had the same behavior **except** for the value of the
307+
`color` property, you still need to add implementations for each member function of the `Circle` class:
310308

311309
```kotlin
312-
class RedCircle(val circle: Circle) : Drawable {
310+
class RedCircle(val circle: Circle) : Circle {
311+
313312
// Start of boilerplate code
314313
override fun draw() {
315314
circle.draw()
@@ -318,8 +317,8 @@ class RedCircle(val circle: Circle) : Drawable {
318317
override fun resize() {
319318
circle.resize()
320319
}
321-
// End of boilerplate code
322320

321+
// End of boilerplate code
323322
override val color = "red"
324323
}
325324
```
@@ -328,8 +327,8 @@ You can see that if you have a large number of member functions in the `Drawable
328327
code in the `RedCircle` class can be very large. However, there is an alternative.
329328

330329
In Kotlin, you can use delegation to delegate the interface implementation to an instance of a class. For example,
331-
you can create an instance of the `Circle` class and delegate the implementations of the member functions of the
332-
`Drawable` interface to this instance. To do this, use the `by` keyword. For example:
330+
you can create an instance of the `Circle` class and delegate the implementations of the member functions of the `Circle`
331+
class to this instance. To do this, use the `by` keyword. For example:
333332

334333
```kotlin
335334
class RedCircle(param: Circle) : Drawable by param

0 commit comments

Comments
 (0)