Skip to content

Commit 5e34192

Browse files
authored
docs(builtin-classes): Add a Unit link, fix the singleton object link (#2748)
Resolves broken link to "singleton object" documentation. Adds a link to the "Unit" type documentation.
1 parent c75b46d commit 5e34192

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/builtin-classes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,8 +351,8 @@ even if they are numbers in Kotlin, as we can see below.
351351

352352
### Unit and singleton objects
353353

354-
The Kotlin builtin `Unit` type is also serializable.
355-
`Unit` is a Kotlin [singleton object](https://kotlinlang.org/docs/tutorials/kotlin-for-py/objects-and-companion-objects.html),
354+
The Kotlin builtin [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/) type is also serializable.
355+
`Unit` is a Kotlin [singleton object](https://kotlinlang.org/docs/object-declarations.html#object-declarations-overview),
356356
and is handled equally with other Kotlin objects.
357357

358358
Conceptually, a singleton is a class with only one instance, meaning that state does not define the object,

0 commit comments

Comments
 (0)