Skip to content

Commit 325a819

Browse files
theaspectnikitabobko
authored andcommitted
Clarifying non obvious syntax with cryptic error
closes #177
1 parent 7a6a8ba commit 325a819

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

proposals/KEEP-0164-coroutines.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -626,6 +626,7 @@ The following style is recommended for library defined context elements.
626626
The example below shows a hypothetical authorization context element that stores current user name:
627627

628628
```kotlin
629+
// ↓ AuthUser here is a reference to the companion object, shorthand for AuthUser.Key
629630
class AuthUser(val name: String) : AbstractCoroutineContextElement(AuthUser) {
630631
companion object Key : CoroutineContext.Key<AuthUser>
631632
}

0 commit comments

Comments
 (0)