Skip to content

minor fix for typo, indent, link, and sample code, etc #4905

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

LiYing2010
Copy link
Contributor

@LiYing2010 LiYing2010 commented Jun 19, 2025

Change List

  • fixed some broken links
  • changed some text to link
  • fixed some indent in sample code
  • changed all the char to ' char
  • fixed some incorrect content

@LiYing2010 LiYing2010 requested a review from a team as a code owner June 19, 2025 17:34
Comment on lines +402 to +418
**Stabilized `@SubclassOptInRequired`**

* KEEP proposal: [subclass-opt-in-required.md](https://github.com/Kotlin/KEEP/blob/master/proposals/subclass-opt-in-required.md)
* YouTrack issue: [KT-54617](https://youtrack.jetbrains.com/issue/KT-54617)
* Available since: 2.1.0

</td>
</tr>

<tr filter="stable">
<td>

**Stable**

</td>
<td>

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JFYI
I moved this one from IN PREVIEW BLOCK to STABLE BLOCK

@@ -45,7 +45,7 @@ Consider this example that extends the `StringBuilder` class:
```kotlin
fun main() {
// Lambda expression with receiver definition
fun StringBuilder.appendText() { append("Hello!") }
val appendText: StringBuilder.() -> Unit = { append("Hello!") }
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JFYI
I think the lambda expression with receiver should be like this
the original sample code is NOT a lambda expression with receiver, but a local extension function.

also, the following paragraph explains:

The lambda expression assigned to appendText .....

so I think it should be val appendText = .... here

Comment on lines +234 to +237
* The `Cat` class inherits from the `Mammal` sealed class and uses the `catName` parameter in its own constructor as
the `name` parameter from the `Mammal` class.
* The `Human` class inherits from the `Mammal` sealed class and uses the `humanName` parameter in its own constructor as
the `name` parameter from the `Mammal` class. It also has the `job` parameter in its constructor.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JFYI
I think it should be:
the child classes use the param in in its own constructor, as the parameter from parent class
fix me if I am wrong.

@@ -204,7 +204,7 @@ In these functions:
* The `operator` keyword marks these functions as operator functions, enabling them to overload the `get()` and `set()` functions.
* The `thisRef` parameter refers to the object **containing** the delegated property. By default, the type is set to `Any?`, but you may need to declare a more specific type.
* The `property` parameter refers to the property whose value is accessed or changed. You can use this parameter to access information
like the property's name or type. By default, the type is set to `Any?`. You don't need to worry about changing this in your code.
like the property's name or type. By default, the type is set to `KProperty<*>`. You don't need to worry about changing this in your code.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JFYI
property in delegate, should be KProperty<*>

@@ -126,7 +126,7 @@ fun main() {
{kotlin-runnable="true" id="kotlin-tour-scope-function-let-non-null"}

The example:
* Creates a variable called `confirm`.
* Creates a variable called `address`.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JFYI
it's address in the sample code

@@ -288,7 +288,7 @@ The example:
* Uses the `.map()` extension function on the `medals` variable.
* Passes a lambda expression to the `.map()` function that refers to `medals` via the `it` keyword and calls the `.uppercase()` extension function on it.
* Uses the `.filter()` extension function on the `medals` variable.
* Passes a lambda expression as a predicate to the `.filter()` function that refers to `medals` via the `it` keyword and checks if the length of the list contained in the `medals` variable is longer than 4 items.
* Passes a lambda expression as a predicate to the `.filter()` function that refers to `medals` via the `it` keyword and checks if the length of the string contained in the `medals` variable is longer than 4 characters.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JFYI
it's string, instead of list

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant