Skip to content
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

operators.md: fix expansion of [0] = #116

Open
wants to merge 1 commit into
base: release
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/src/md/kotlin.core/operators.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,12 @@ The expression `C[0][0]++` is expanded (see the [Expressions][expressions] secti
- Second, the [assignment][Assignments] to an indexing expression (produced by the previous expansion) is expanded, resulting in:

```kotlin
C[0].set(C[0][0].inc())
C[0].set(0, C[0][0].inc())
```
- Third, the [indexing expressions][Indexing expressions] are expanded, resulting in:

```kotlin
C.get(0).set(C.get(0).get(0).inc())
C.get(0).set(0, C.get(0).get(0).inc())
```

TODO(Specify when we run the overload resolution to know what we're expanding to)
Expand All @@ -103,7 +103,7 @@ TODO(Specify when we run the overload resolution to know what we're expanding to
>
> ```kotlin
> val $tmp = C.get(0)
> $tmp.set($tmp.get(0).inc())
> $tmp.set(0, $tmp.get(0).inc())
> ```

### Destructuring declarations
Expand Down