From 5ccbce6de62b8541f0637e2b288c13d9db580f55 Mon Sep 17 00:00:00 2001 From: Evgeny Gerashchenko Date: Tue, 19 Mar 2013 23:43:37 +0400 Subject: [PATCH] Got rid of "tuple" word all over the code. --- .../tests/{tuples => }/UnitValue.kt | 0 .../renderer/{TupleTypes.kt => UnitType.kt} | 0 .../checkers/JetDiagnosticsTestGenerated.java | 21 ++++++------------- ...esolveDescriptorRendererTestGenerated.java | 6 +++--- .../jet/renderer/DescriptorRendererTest.java | 2 +- js/js.libraries/src/core/json.kt | 4 ++-- js/js.libraries/src/core/string.kt | 2 +- js/js.libraries/src/stdlib/JUMapsCode.kt | 4 ++-- js/js.translator/testFiles/kotlin_lib.js | 2 +- .../src/kotlin2/Traversable.kt | 2 +- libraries/stdlib/src/generated/_Arrays.kt | 2 +- .../stdlib/src/generated/_BooleanArrays.kt | 2 +- libraries/stdlib/src/generated/_ByteArrays.kt | 2 +- libraries/stdlib/src/generated/_CharArrays.kt | 2 +- .../stdlib/src/generated/_DoubleArrays.kt | 2 +- .../stdlib/src/generated/_FloatArrays.kt | 2 +- libraries/stdlib/src/generated/_IntArrays.kt | 2 +- libraries/stdlib/src/generated/_Iterables.kt | 2 +- .../stdlib/src/generated/_IteratorsCommon.kt | 2 +- libraries/stdlib/src/generated/_LongArrays.kt | 2 +- .../stdlib/src/generated/_ShortArrays.kt | 2 +- libraries/stdlib/src/kotlin/JUtilJVM.kt | 8 +++---- libraries/stdlib/test/MapTest.kt | 2 +- libraries/stdlib/test/js/MapJsTest.kt | 2 +- .../kotlin/doc/templates/KDocTemplate.kt | 6 ------ .../src/templates/Collections.kt | 2 +- 26 files changed, 35 insertions(+), 50 deletions(-) rename compiler/testData/diagnostics/tests/{tuples => }/UnitValue.kt (100%) rename compiler/testData/renderer/{TupleTypes.kt => UnitType.kt} (100%) diff --git a/compiler/testData/diagnostics/tests/tuples/UnitValue.kt b/compiler/testData/diagnostics/tests/UnitValue.kt similarity index 100% rename from compiler/testData/diagnostics/tests/tuples/UnitValue.kt rename to compiler/testData/diagnostics/tests/UnitValue.kt diff --git a/compiler/testData/renderer/TupleTypes.kt b/compiler/testData/renderer/UnitType.kt similarity index 100% rename from compiler/testData/renderer/TupleTypes.kt rename to compiler/testData/renderer/UnitType.kt diff --git a/compiler/tests/org/jetbrains/jet/checkers/JetDiagnosticsTestGenerated.java b/compiler/tests/org/jetbrains/jet/checkers/JetDiagnosticsTestGenerated.java index 19b18b0c4c1..e21794dcb68 100644 --- a/compiler/tests/org/jetbrains/jet/checkers/JetDiagnosticsTestGenerated.java +++ b/compiler/tests/org/jetbrains/jet/checkers/JetDiagnosticsTestGenerated.java @@ -33,7 +33,7 @@ import org.jetbrains.jet.checkers.AbstractDiagnosticsTestWithEagerResolve; @InnerTestClasses({JetDiagnosticsTestGenerated.Tests.class, JetDiagnosticsTestGenerated.Script.class}) public class JetDiagnosticsTestGenerated extends AbstractDiagnosticsTestWithEagerResolve { @TestMetadata("compiler/testData/diagnostics/tests") - @InnerTestClasses({Tests.Annotations.class, Tests.BackingField.class, Tests.Cast.class, Tests.CheckArguments.class, Tests.ControlFlowAnalysis.class, Tests.ControlStructures.class, Tests.DataClasses.class, Tests.DataFlow.class, Tests.DataFlowInfoTraversal.class, Tests.DeclarationChecks.class, Tests.Deparenthesize.class, Tests.Enum.class, Tests.Extensions.class, Tests.FunctionLiterals.class, Tests.Generics.class, Tests.IncompleteCode.class, Tests.Inference.class, Tests.Infos.class, Tests.Inner.class, Tests.J_k.class, Tests.Jdk_annotations.class, Tests.Library.class, Tests.NullabilityAndAutoCasts.class, Tests.NullableTypes.class, Tests.Objects.class, Tests.OperatorsOverloading.class, Tests.Overload.class, Tests.Override.class, Tests.Redeclarations.class, Tests.Regressions.class, Tests.Resolve.class, Tests.Scopes.class, Tests.SenselessComparison.class, Tests.Shadowing.class, Tests.SmartCasts.class, Tests.Substitutions.class, Tests.Subtyping.class, Tests.ThisAndSuper.class, Tests.Tuples.class, Tests.Varargs.class}) + @InnerTestClasses({Tests.Annotations.class, Tests.BackingField.class, Tests.Cast.class, Tests.CheckArguments.class, Tests.ControlFlowAnalysis.class, Tests.ControlStructures.class, Tests.DataClasses.class, Tests.DataFlow.class, Tests.DataFlowInfoTraversal.class, Tests.DeclarationChecks.class, Tests.Deparenthesize.class, Tests.Enum.class, Tests.Extensions.class, Tests.FunctionLiterals.class, Tests.Generics.class, Tests.IncompleteCode.class, Tests.Inference.class, Tests.Infos.class, Tests.Inner.class, Tests.J_k.class, Tests.Jdk_annotations.class, Tests.Library.class, Tests.NullabilityAndAutoCasts.class, Tests.NullableTypes.class, Tests.Objects.class, Tests.OperatorsOverloading.class, Tests.Overload.class, Tests.Override.class, Tests.Redeclarations.class, Tests.Regressions.class, Tests.Resolve.class, Tests.Scopes.class, Tests.SenselessComparison.class, Tests.Shadowing.class, Tests.SmartCasts.class, Tests.Substitutions.class, Tests.Subtyping.class, Tests.ThisAndSuper.class, Tests.Varargs.class}) public static class Tests extends AbstractDiagnosticsTestWithEagerResolve { @TestMetadata("Abstract.kt") public void testAbstract() throws Exception { @@ -484,6 +484,11 @@ public class JetDiagnosticsTestGenerated extends AbstractDiagnosticsTestWithEage doTest("compiler/testData/diagnostics/tests/UnitByDefaultForFunctionTypes.kt"); } + @TestMetadata("UnitValue.kt") + public void testUnitValue() throws Exception { + doTest("compiler/testData/diagnostics/tests/UnitValue.kt"); + } + @TestMetadata("UnreachableCode.kt") public void testUnreachableCode() throws Exception { doTest("compiler/testData/diagnostics/tests/UnreachableCode.kt"); @@ -4359,19 +4364,6 @@ public class JetDiagnosticsTestGenerated extends AbstractDiagnosticsTestWithEage } - @TestMetadata("compiler/testData/diagnostics/tests/tuples") - public static class Tuples extends AbstractDiagnosticsTestWithEagerResolve { - public void testAllFilesPresentInTuples() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("compiler/testData/diagnostics/tests/tuples"), Pattern.compile("^(.+)\\.kt$"), true); - } - - @TestMetadata("UnitValue.kt") - public void testUnitValue() throws Exception { - doTest("compiler/testData/diagnostics/tests/tuples/UnitValue.kt"); - } - - } - @TestMetadata("compiler/testData/diagnostics/tests/varargs") public static class Varargs extends AbstractDiagnosticsTestWithEagerResolve { public void testAllFilesPresentInVarargs() throws Exception { @@ -4476,7 +4468,6 @@ public class JetDiagnosticsTestGenerated extends AbstractDiagnosticsTestWithEage suite.addTestSuite(Substitutions.class); suite.addTestSuite(Subtyping.class); suite.addTestSuite(ThisAndSuper.class); - suite.addTestSuite(Tuples.class); suite.addTestSuite(Varargs.class); return suite; } diff --git a/compiler/tests/org/jetbrains/jet/lang/resolve/lazy/LazyResolveDescriptorRendererTestGenerated.java b/compiler/tests/org/jetbrains/jet/lang/resolve/lazy/LazyResolveDescriptorRendererTestGenerated.java index c2f49b6d26e..5aa0fa7b550 100644 --- a/compiler/tests/org/jetbrains/jet/lang/resolve/lazy/LazyResolveDescriptorRendererTestGenerated.java +++ b/compiler/tests/org/jetbrains/jet/lang/resolve/lazy/LazyResolveDescriptorRendererTestGenerated.java @@ -76,9 +76,9 @@ public class LazyResolveDescriptorRendererTestGenerated extends AbstractLazyReso doTest("compiler/testData/renderer/KeywordsInNames.kt"); } - @TestMetadata("TupleTypes.kt") - public void testTupleTypes() throws Exception { - doTest("compiler/testData/renderer/TupleTypes.kt"); + @TestMetadata("UnitType.kt") + public void testUnitType() throws Exception { + doTest("compiler/testData/renderer/UnitType.kt"); } } diff --git a/compiler/tests/org/jetbrains/jet/renderer/DescriptorRendererTest.java b/compiler/tests/org/jetbrains/jet/renderer/DescriptorRendererTest.java index b2045a46369..11a21910c73 100644 --- a/compiler/tests/org/jetbrains/jet/renderer/DescriptorRendererTest.java +++ b/compiler/tests/org/jetbrains/jet/renderer/DescriptorRendererTest.java @@ -61,7 +61,7 @@ public class DescriptorRendererTest extends JetLiteFixture { doTest(); } - public void testTupleTypes() throws IOException { + public void testUnitType() throws IOException { doTest(); } diff --git a/js/js.libraries/src/core/json.kt b/js/js.libraries/src/core/json.kt index fa3a36ec20a..bb486e2706c 100644 --- a/js/js.libraries/src/core/json.kt +++ b/js/js.libraries/src/core/json.kt @@ -14,10 +14,10 @@ public fun Json.set(paramName : String, value : Any?) : Unit = js.noImpl library("jsonGet") public fun Json.get(paramName : String) : Any? = js.noImpl -library("jsonFromTuples") +library("jsonFromPairs") public fun json(vararg pairs : Pair) : Json = js.noImpl -library("jsonFromTuples") +library("jsonFromPairs") public fun json2(pairs : Array>) : Json = js.noImpl library("jsonAddProperties") diff --git a/js/js.libraries/src/core/string.kt b/js/js.libraries/src/core/string.kt index 25ec83bb81a..6633024a24c 100644 --- a/js/js.libraries/src/core/string.kt +++ b/js/js.libraries/src/core/string.kt @@ -106,7 +106,7 @@ native public fun String.getBytes(charset : java.nio.charset.Charset) : ByteArra native public fun String.getBytes(charsetName : String) : ByteArray = (this as java.lang.String).getBytes(charsetName)!! -native public fun String.getChars(srcBegin : Int, srcEnd : Int, dst : CharArray, dstBegin : Int) : Tuple0 = (this as java.lang.String).getChars(srcBegin, srcEnd, dst, dstBegin)!! +native public fun String.getChars(srcBegin : Int, srcEnd : Int, dst : CharArray, dstBegin : Int) : Unit = (this as java.lang.String).getChars(srcBegin, srcEnd, dst, dstBegin)!! native public fun String.intern() : String = (this as java.lang.String).intern()!! diff --git a/js/js.libraries/src/stdlib/JUMapsCode.kt b/js/js.libraries/src/stdlib/JUMapsCode.kt index 8903838a6cf..56c5d92b2ed 100644 --- a/js/js.libraries/src/stdlib/JUMapsCode.kt +++ b/js/js.libraries/src/stdlib/JUMapsCode.kt @@ -8,10 +8,10 @@ public fun MutableMap.set(key : K, value : V): Unit { } /** - * Returns a new [[HashMap]] populated with the given tuple values where the first value in each tuple + * Returns a new [[HashMap]] populated with the given pairs where the first value in each pair * is the key and the second value is the value * - * @includeFunctionBody ../../test/MapTest.kt createUsingTuples + * @includeFunctionBody ../../test/MapTest.kt createUsingPairs */ public inline fun hashMap(vararg values: Pair): HashMap { val answer = HashMap() diff --git a/js/js.translator/testFiles/kotlin_lib.js b/js/js.translator/testFiles/kotlin_lib.js index 44d1131e0ca..817653ac16c 100644 --- a/js/js.translator/testFiles/kotlin_lib.js +++ b/js/js.translator/testFiles/kotlin_lib.js @@ -531,7 +531,7 @@ var kotlin = {set:function (receiver, key, value) { return obj.toString(); }; - Kotlin.jsonFromTuples = function (pairArr) { + Kotlin.jsonFromPairs = function (pairArr) { var i = pairArr.length; var res = {}; while (i > 0) { diff --git a/libraries/sandbox/extensionTraits/src/kotlin2/Traversable.kt b/libraries/sandbox/extensionTraits/src/kotlin2/Traversable.kt index 05777e133a0..9dc1caaba79 100644 --- a/libraries/sandbox/extensionTraits/src/kotlin2/Traversable.kt +++ b/libraries/sandbox/extensionTraits/src/kotlin2/Traversable.kt @@ -343,7 +343,7 @@ public trait Traversable: Iterable { } /** - * Convert collection of arbitrary elements to collection of tuples of the index and the element + * Convert collection of arbitrary elements to collection of pairs of the index and the element * * @includeFunctionBody ../../test/ListTest.kt withIndices */ diff --git a/libraries/stdlib/src/generated/_Arrays.kt b/libraries/stdlib/src/generated/_Arrays.kt index 474e70b0fdb..2896a8e9a43 100644 --- a/libraries/stdlib/src/generated/_Arrays.kt +++ b/libraries/stdlib/src/generated/_Arrays.kt @@ -360,7 +360,7 @@ public inline fun Array.withIndices() : Iterator> { /** * Copies all elements into a [[List]] and sorts it by value of compare_function(element) - * E.g. arrayList("two" to 2, "one" to 1).sortBy({it._2}) returns list sorted by second element of tuple + * E.g. arrayList("two" to 2, "one" to 1).sortBy({it.second}) returns list sorted by second element of pair */ public inline fun > Array.sortBy(f: (T) -> R) : List { val sortedList = toCollection(ArrayList()) diff --git a/libraries/stdlib/src/generated/_BooleanArrays.kt b/libraries/stdlib/src/generated/_BooleanArrays.kt index fa5b800ca76..ab143afd7d5 100644 --- a/libraries/stdlib/src/generated/_BooleanArrays.kt +++ b/libraries/stdlib/src/generated/_BooleanArrays.kt @@ -333,7 +333,7 @@ public inline fun BooleanArray.withIndices() : Iterator> { /** * Copies all elements into a [[List]] and sorts it by value of compare_function(element) - * E.g. arrayList("two" to 2, "one" to 1).sortBy({it._2}) returns list sorted by second element of tuple + * E.g. arrayList("two" to 2, "one" to 1).sortBy({it.second}) returns list sorted by second element of pair */ public inline fun > BooleanArray.sortBy(f: (Boolean) -> R) : List { val sortedList = toCollection(ArrayList()) diff --git a/libraries/stdlib/src/generated/_ByteArrays.kt b/libraries/stdlib/src/generated/_ByteArrays.kt index bcc2ec7de8b..dc9ff3db637 100644 --- a/libraries/stdlib/src/generated/_ByteArrays.kt +++ b/libraries/stdlib/src/generated/_ByteArrays.kt @@ -333,7 +333,7 @@ public inline fun ByteArray.withIndices() : Iterator> { /** * Copies all elements into a [[List]] and sorts it by value of compare_function(element) - * E.g. arrayList("two" to 2, "one" to 1).sortBy({it._2}) returns list sorted by second element of tuple + * E.g. arrayList("two" to 2, "one" to 1).sortBy({it.second}) returns list sorted by second element of pair */ public inline fun > ByteArray.sortBy(f: (Byte) -> R) : List { val sortedList = toCollection(ArrayList()) diff --git a/libraries/stdlib/src/generated/_CharArrays.kt b/libraries/stdlib/src/generated/_CharArrays.kt index 79696bffb71..abdfb4faaed 100644 --- a/libraries/stdlib/src/generated/_CharArrays.kt +++ b/libraries/stdlib/src/generated/_CharArrays.kt @@ -333,7 +333,7 @@ public inline fun CharArray.withIndices() : Iterator> { /** * Copies all elements into a [[List]] and sorts it by value of compare_function(element) - * E.g. arrayList("two" to 2, "one" to 1).sortBy({it._2}) returns list sorted by second element of tuple + * E.g. arrayList("two" to 2, "one" to 1).sortBy({it.second}) returns list sorted by second element of pair */ public inline fun > CharArray.sortBy(f: (Char) -> R) : List { val sortedList = toCollection(ArrayList()) diff --git a/libraries/stdlib/src/generated/_DoubleArrays.kt b/libraries/stdlib/src/generated/_DoubleArrays.kt index 6c5b20bddf4..67c067f6abd 100644 --- a/libraries/stdlib/src/generated/_DoubleArrays.kt +++ b/libraries/stdlib/src/generated/_DoubleArrays.kt @@ -333,7 +333,7 @@ public inline fun DoubleArray.withIndices() : Iterator> { /** * Copies all elements into a [[List]] and sorts it by value of compare_function(element) - * E.g. arrayList("two" to 2, "one" to 1).sortBy({it._2}) returns list sorted by second element of tuple + * E.g. arrayList("two" to 2, "one" to 1).sortBy({it.second}) returns list sorted by second element of pair */ public inline fun > DoubleArray.sortBy(f: (Double) -> R) : List { val sortedList = toCollection(ArrayList()) diff --git a/libraries/stdlib/src/generated/_FloatArrays.kt b/libraries/stdlib/src/generated/_FloatArrays.kt index f7ffe1ff959..85b76ce61e4 100644 --- a/libraries/stdlib/src/generated/_FloatArrays.kt +++ b/libraries/stdlib/src/generated/_FloatArrays.kt @@ -333,7 +333,7 @@ public inline fun FloatArray.withIndices() : Iterator> { /** * Copies all elements into a [[List]] and sorts it by value of compare_function(element) - * E.g. arrayList("two" to 2, "one" to 1).sortBy({it._2}) returns list sorted by second element of tuple + * E.g. arrayList("two" to 2, "one" to 1).sortBy({it.second}) returns list sorted by second element of pair */ public inline fun > FloatArray.sortBy(f: (Float) -> R) : List { val sortedList = toCollection(ArrayList()) diff --git a/libraries/stdlib/src/generated/_IntArrays.kt b/libraries/stdlib/src/generated/_IntArrays.kt index eeb853d4020..f3bdc38d073 100644 --- a/libraries/stdlib/src/generated/_IntArrays.kt +++ b/libraries/stdlib/src/generated/_IntArrays.kt @@ -333,7 +333,7 @@ public inline fun IntArray.withIndices() : Iterator> { /** * Copies all elements into a [[List]] and sorts it by value of compare_function(element) - * E.g. arrayList("two" to 2, "one" to 1).sortBy({it._2}) returns list sorted by second element of tuple + * E.g. arrayList("two" to 2, "one" to 1).sortBy({it.second}) returns list sorted by second element of pair */ public inline fun > IntArray.sortBy(f: (Int) -> R) : List { val sortedList = toCollection(ArrayList()) diff --git a/libraries/stdlib/src/generated/_Iterables.kt b/libraries/stdlib/src/generated/_Iterables.kt index 36724978829..2aed216489f 100644 --- a/libraries/stdlib/src/generated/_Iterables.kt +++ b/libraries/stdlib/src/generated/_Iterables.kt @@ -245,7 +245,7 @@ public inline fun Iterable.withIndices() : Iterator> { /** * Copies all elements into a [[List]] and sorts it by value of compare_function(element) - * E.g. arrayList("two" to 2, "one" to 1).sortBy({it._2}) returns list sorted by second element of tuple + * E.g. arrayList("two" to 2, "one" to 1).sortBy({it.second}) returns list sorted by second element of pair */ public inline fun > Iterable.sortBy(f: (T) -> R) : List { val sortedList = toCollection(ArrayList()) diff --git a/libraries/stdlib/src/generated/_IteratorsCommon.kt b/libraries/stdlib/src/generated/_IteratorsCommon.kt index 781480d8886..5c10fe2f15c 100644 --- a/libraries/stdlib/src/generated/_IteratorsCommon.kt +++ b/libraries/stdlib/src/generated/_IteratorsCommon.kt @@ -245,7 +245,7 @@ public inline fun Iterator.withIndices() : Iterator> { /** * Copies all elements into a [[List]] and sorts it by value of compare_function(element) - * E.g. arrayList("two" to 2, "one" to 1).sortBy({it._2}) returns list sorted by second element of tuple + * E.g. arrayList("two" to 2, "one" to 1).sortBy({it.second}) returns list sorted by second element of pair */ public inline fun > Iterator.sortBy(f: (T) -> R) : List { val sortedList = toCollection(ArrayList()) diff --git a/libraries/stdlib/src/generated/_LongArrays.kt b/libraries/stdlib/src/generated/_LongArrays.kt index e61d722ec3a..7a97607ea78 100644 --- a/libraries/stdlib/src/generated/_LongArrays.kt +++ b/libraries/stdlib/src/generated/_LongArrays.kt @@ -333,7 +333,7 @@ public inline fun LongArray.withIndices() : Iterator> { /** * Copies all elements into a [[List]] and sorts it by value of compare_function(element) - * E.g. arrayList("two" to 2, "one" to 1).sortBy({it._2}) returns list sorted by second element of tuple + * E.g. arrayList("two" to 2, "one" to 1).sortBy({it.second}) returns list sorted by second element of pair */ public inline fun > LongArray.sortBy(f: (Long) -> R) : List { val sortedList = toCollection(ArrayList()) diff --git a/libraries/stdlib/src/generated/_ShortArrays.kt b/libraries/stdlib/src/generated/_ShortArrays.kt index 3923a2d424d..35725f893db 100644 --- a/libraries/stdlib/src/generated/_ShortArrays.kt +++ b/libraries/stdlib/src/generated/_ShortArrays.kt @@ -333,7 +333,7 @@ public inline fun ShortArray.withIndices() : Iterator> { /** * Copies all elements into a [[List]] and sorts it by value of compare_function(element) - * E.g. arrayList("two" to 2, "one" to 1).sortBy({it._2}) returns list sorted by second element of tuple + * E.g. arrayList("two" to 2, "one" to 1).sortBy({it.second}) returns list sorted by second element of pair */ public inline fun > ShortArray.sortBy(f: (Short) -> R) : List { val sortedList = toCollection(ArrayList()) diff --git a/libraries/stdlib/src/kotlin/JUtilJVM.kt b/libraries/stdlib/src/kotlin/JUtilJVM.kt index 57909663473..9e198ed18da 100644 --- a/libraries/stdlib/src/kotlin/JUtilJVM.kt +++ b/libraries/stdlib/src/kotlin/JUtilJVM.kt @@ -46,10 +46,10 @@ deprecated("Use sortedSetOf(...) instead") public fun sortedSet(comparator: Comparator, vararg values: T) : TreeSet = sortedSetOf(comparator, *values) /** - * Returns a new [[HashMap]] populated with the given tuple values where the first value in each tuple + * Returns a new [[HashMap]] populated with the given pairs where the first value in each pair * is the key and the second value is the value * - * @includeFunctionBody ../../test/MapTest.kt createUsingTuples + * @includeFunctionBody ../../test/MapTest.kt createUsingPairs */ public fun hashMapOf(vararg values: Pair): HashMap { val answer = HashMap(values.size) @@ -67,7 +67,7 @@ deprecated("Use mapOf(...) or hashMapOf(...) instead") public fun hashMap(vararg values: Pair): HashMap = hashMapOf(*values) /** - * Returns a new [[SortedMap]] populated with the given tuple values where the first value in each tuple + * Returns a new [[SortedMap]] populated with the given pairs where the first value in each pair * is the key and the second value is the value * * @includeFunctionBody ../../test/MapTest.kt createSortedMap @@ -88,7 +88,7 @@ deprecated("Use sortedMapOf(...) instead") public fun sortedMap(vararg values: Pair): SortedMap = sortedMapOf(*values) /** - * Returns a new [[LinkedHashMap]] populated with the given tuple values where the first value in each tuple + * Returns a new [[LinkedHashMap]] populated with the given pairs where the first value in each pair * is the key and the second value is the value. This map preserves insertion order so iterating through * the map's entries will be in the same order * diff --git a/libraries/stdlib/test/MapTest.kt b/libraries/stdlib/test/MapTest.kt index 19a9fbbb998..ff6491308c3 100644 --- a/libraries/stdlib/test/MapTest.kt +++ b/libraries/stdlib/test/MapTest.kt @@ -127,7 +127,7 @@ class MapTest { assertEquals(arrayList("beer2", "Mells2"), m2.values().toList()) } - test fun createUsingTuples() { + test fun createUsingPairs() { val map = hashMap(Pair("a", 1), Pair("b", 2)) assertEquals(2, map.size) assertEquals(1, map.get("a")) diff --git a/libraries/stdlib/test/js/MapJsTest.kt b/libraries/stdlib/test/js/MapJsTest.kt index dc4efcf531a..3132b0878f3 100644 --- a/libraries/stdlib/test/js/MapJsTest.kt +++ b/libraries/stdlib/test/js/MapJsTest.kt @@ -103,7 +103,7 @@ class MapJsTest { } */ - test fun createUsingTuples() { + test fun createUsingPairs() { val map = hashMap(Pair("a", 1), Pair("b", 2)) assertEquals(2, map.size) assertEquals(1, map.get("a")) diff --git a/libraries/tools/kdoc/src/main/kotlin/org/jetbrains/kotlin/doc/templates/KDocTemplate.kt b/libraries/tools/kdoc/src/main/kotlin/org/jetbrains/kotlin/doc/templates/KDocTemplate.kt index 1dee78b05eb..4d3c1c74cba 100644 --- a/libraries/tools/kdoc/src/main/kotlin/org/jetbrains/kotlin/doc/templates/KDocTemplate.kt +++ b/libraries/tools/kdoc/src/main/kotlin/org/jetbrains/kotlin/doc/templates/KDocTemplate.kt @@ -139,12 +139,6 @@ abstract class KDocTemplate() : TextTemplate() { // TODO use drop() val rest = arguments.subList(0, arguments.size - 1).orEmpty() "${typeArguments(rest, "(", ")", "()")} -> ${link(rt)}" - } else if (cname.startsWith("jet.Tuple")) { - if (arguments.isEmpty()) { - "Unit" - } else { - "#${typeArguments(arguments, "(", ")", "()")}" - } } else { val name = if (fullName) cname else c.simpleName "$prefix$name${typeArguments(arguments)}" diff --git a/libraries/tools/kotlin-stdlib-gen/src/templates/Collections.kt b/libraries/tools/kotlin-stdlib-gen/src/templates/Collections.kt index 9a77b3a926e..b56bcbadfda 100644 --- a/libraries/tools/kotlin-stdlib-gen/src/templates/Collections.kt +++ b/libraries/tools/kotlin-stdlib-gen/src/templates/Collections.kt @@ -518,7 +518,7 @@ fun collections() { f("sortBy(f: (T) -> R)") { doc = """ Copies all elements into a [[List]] and sorts it by value of compare_function(element) - E.g. arrayList("two" to 2, "one" to 1).sortBy({it._2}) returns list sorted by second element of tuple + E.g. arrayList("two" to 2, "one" to 1).sortBy({it.second}) returns list sorted by second element of pair """ returns("List") typeParam("R: Comparable")