Skip to content

Conversation

@LouisCAD
Copy link
Contributor

Add contract to CoroutineDispatcher.invoke operator, to allow initializing read-only properties declared before, from inside the passed block.

https://youtrack.jetbrains.com/issue/KT-32313/Support-contracts-for-operator-functions

This commit also improve the KDoc to show a usage example, and explain why it's less error-prone than withContext.

Add contract to CoroutineDispatcher.invoke operator,
to allow initializing read-only properties declared before,
from inside the passed block.

https://youtrack.jetbrains.com/issue/KT-32313/Support-contracts-for-operator-functions

This commit also improve the KDoc to show a usage example,
and explain why it's less error-prone than withContext.
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