diff --git a/libraries/stdlib/src/kotlin/util/Standard.kt b/libraries/stdlib/src/kotlin/util/Standard.kt index 7ad93e9418b..f8bd255ac69 100644 --- a/libraries/stdlib/src/kotlin/util/Standard.kt +++ b/libraries/stdlib/src/kotlin/util/Standard.kt @@ -18,13 +18,6 @@ public fun TODO(): Nothing = throw NotImplementedError() public fun TODO(reason: String): Nothing = throw NotImplementedError("An operation is not implemented: $reason") -/** - * Creates a tuple of type [Pair] from this and [that]. - * - * This can be useful for creating [Map] literals with less noise, for example: - * @sample test.collections.MapTest.createUsingTo - */ -public fun A.to(that: B): Pair = Pair(this, that) /** * Calls the specified function [f] and returns its result. diff --git a/libraries/stdlib/src/kotlin/util/Tuples.kt b/libraries/stdlib/src/kotlin/util/Tuples.kt index 6d89eab63ea..8945c2cadce 100644 --- a/libraries/stdlib/src/kotlin/util/Tuples.kt +++ b/libraries/stdlib/src/kotlin/util/Tuples.kt @@ -28,6 +28,14 @@ public data class Pair( public override fun toString(): String = "($first, $second)" } +/** + * Creates a tuple of type [Pair] from this and [that]. + * + * This can be useful for creating [Map] literals with less noise, for example: + * @sample test.collections.MapTest.createUsingTo + */ +public fun A.to(that: B): Pair = Pair(this, that) + /** * Converts this pair into a list. */