Add links to Scope Functions docs (PR #2407)

Add links to Scope Functions docs on kotlinlang.org to 'with', 'run', 'let', 'apply', and 'also' extension function docs
This commit is contained in:
Kevin Peek
2019-06-13 13:49:38 -04:00
committed by ilya-g
parent 1f17ff5d38
commit 4c91ba90bb
@@ -33,6 +33,8 @@ public inline fun TODO(reason: String): Nothing = throw NotImplementedError("An
/**
* Calls the specified function [block] and returns its result.
*
* For detailed usage information see the documentation for [scope functions](https://kotlinlang.org/docs/reference/scope-functions.html#run).
*/
@kotlin.internal.InlineOnly
public inline fun <R> run(block: () -> R): R {
@@ -44,6 +46,8 @@ public inline fun <R> run(block: () -> R): R {
/**
* Calls the specified function [block] with `this` value as its receiver and returns its result.
*
* For detailed usage information see the documentation for [scope functions](https://kotlinlang.org/docs/reference/scope-functions.html#run).
*/
@kotlin.internal.InlineOnly
public inline fun <T, R> T.run(block: T.() -> R): R {
@@ -55,6 +59,8 @@ public inline fun <T, R> T.run(block: T.() -> R): R {
/**
* Calls the specified function [block] with the given [receiver] as its receiver and returns its result.
*
* For detailed usage information see the documentation for [scope functions](https://kotlinlang.org/docs/reference/scope-functions.html#with).
*/
@kotlin.internal.InlineOnly
public inline fun <T, R> with(receiver: T, block: T.() -> R): R {
@@ -66,6 +72,8 @@ public inline fun <T, R> with(receiver: T, block: T.() -> R): R {
/**
* Calls the specified function [block] with `this` value as its receiver and returns `this` value.
*
* For detailed usage information see the documentation for [scope functions](https://kotlinlang.org/docs/reference/scope-functions.html#apply).
*/
@kotlin.internal.InlineOnly
public inline fun <T> T.apply(block: T.() -> Unit): T {
@@ -78,6 +86,8 @@ public inline fun <T> T.apply(block: T.() -> Unit): T {
/**
* Calls the specified function [block] with `this` value as its argument and returns `this` value.
*
* For detailed usage information see the documentation for [scope functions](https://kotlinlang.org/docs/reference/scope-functions.html#also).
*/
@kotlin.internal.InlineOnly
@SinceKotlin("1.1")
@@ -91,6 +101,8 @@ public inline fun <T> T.also(block: (T) -> Unit): T {
/**
* Calls the specified function [block] with `this` value as its argument and returns its result.
*
* For detailed usage information see the documentation for [scope functions](https://kotlinlang.org/docs/reference/scope-functions.html#let).
*/
@kotlin.internal.InlineOnly
public inline fun <T, R> T.let(block: (T) -> R): R {