From 70cc7fbf1fc0dfc1a5a94cbcdc2b3cd70aa53cc4 Mon Sep 17 00:00:00 2001 From: Ilya Gorbunov Date: Fri, 3 Apr 2015 17:13:46 +0300 Subject: [PATCH] Remove never intentionally used String.hashCode extension. --- .../codegen/boxWithStdlib/boxingOptimization/kt5493.kt | 2 +- libraries/stdlib/src/kotlin/text/StringsJVM.kt | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/compiler/testData/codegen/boxWithStdlib/boxingOptimization/kt5493.kt b/compiler/testData/codegen/boxWithStdlib/boxingOptimization/kt5493.kt index 52925e7f036..efd7e94a5f7 100644 --- a/compiler/testData/codegen/boxWithStdlib/boxingOptimization/kt5493.kt +++ b/compiler/testData/codegen/boxWithStdlib/boxingOptimization/kt5493.kt @@ -3,6 +3,6 @@ fun box() : String { return "OK" } finally { - null?.hashCode() + null?.toString() } } diff --git a/libraries/stdlib/src/kotlin/text/StringsJVM.kt b/libraries/stdlib/src/kotlin/text/StringsJVM.kt index b561324acaa..6191259eb18 100644 --- a/libraries/stdlib/src/kotlin/text/StringsJVM.kt +++ b/libraries/stdlib/src/kotlin/text/StringsJVM.kt @@ -46,12 +46,6 @@ public fun String.equals(anotherString: String, ignoreCase: Boolean = false): Bo else (this as java.lang.String).equalsIgnoreCase(anotherString) -/** - * Returns the hash code of this string. - */ -public fun String.hashCode(): Int = (this as java.lang.String).hashCode() - - /** * Returns a copy of this string with all occurrences of [oldChar] replaced with [newChar]. */