Skip to content

Commit

Permalink
Reflection: Fix property reference type names
Browse files Browse the repository at this point in the history
  • Loading branch information
OliverO2 authored and sarahhaggarty committed Jun 29, 2023
1 parent 63545be commit d86792a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/topics/reflection.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,11 +197,11 @@ fun main() {
}
```
The expression `::x` evaluates to a `KProperty<Int>` type property object. You can read its
The expression `::x` evaluates to a `KProperty0<Int>` type property object. You can read its
value using `get()` or retrieve the property name using the `name` property. For more information, see
the [docs on the `KProperty` class](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.reflect/-k-property/index.html).
For a mutable property such as `var y = 1`, `::y` returns a value with the [`KMutableProperty<Int>`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.reflect/-k-mutable-property/index.html) type
For a mutable property such as `var y = 1`, `::y` returns a value with the [`KMutableProperty0<Int>`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.reflect/-k-mutable-property/index.html) type
which has a `set()` method:
```kotlin
Expand Down Expand Up @@ -366,4 +366,4 @@ class Outer {

val o = Outer()
val boundInnerCtor = o::Inner
```
```

0 comments on commit d86792a

Please sign in to comment.