From 8e951dee163872661dc368fa1c0a6dedd53f2a9e Mon Sep 17 00:00:00 2001 From: Ilya Gorbunov Date: Tue, 31 Jan 2017 22:22:32 +0300 Subject: [PATCH] Drop remaining ERROR deprecations from kotlin-stdlib-js. Leave only `native`, `parseInt`, `parseFloat` and `noImpl`. --- js/js.libraries/src/core/annotations.kt | 4 ---- js/js.libraries/src/core/regex.kt | 9 --------- js/js.libraries/src/core/stringsCode.kt | 4 ---- js/js.libraries/src/deprecated/qunit/core.kt | 9 --------- 4 files changed, 26 deletions(-) delete mode 100644 js/js.libraries/src/deprecated/qunit/core.kt diff --git a/js/js.libraries/src/core/annotations.kt b/js/js.libraries/src/core/annotations.kt index a55aad9d365..e06d873a4e5 100644 --- a/js/js.libraries/src/core/annotations.kt +++ b/js/js.libraries/src/core/annotations.kt @@ -37,10 +37,6 @@ public annotation class nativeInvoke @Target(CLASS, FUNCTION, PROPERTY) internal annotation class library(public val name: String = "") -@Deprecated("It is no longer has any effect and will be dropped in a future version", level = DeprecationLevel.ERROR) -@Target(PROPERTY) -public annotation class enumerable() - @Target(CLASS) internal annotation class marker diff --git a/js/js.libraries/src/core/regex.kt b/js/js.libraries/src/core/regex.kt index 5ceab50d5a8..95c14567019 100644 --- a/js/js.libraries/src/core/regex.kt +++ b/js/js.libraries/src/core/regex.kt @@ -64,9 +64,6 @@ public class Regex(pattern: String, options: Set) { return nativePattern.test(input.toString()) } - @Deprecated("Use containsMatchIn() or 'in' operator instead.", ReplaceWith("this in input"), level = DeprecationLevel.ERROR) - public fun hasMatch(input: CharSequence): Boolean = containsMatchIn(input) - /** Returns the first match of a regular expression in the [input], beginning at the specified [startIndex]. * * @param startIndex An index to start search with, by default 0. Must be not less than zero and not greater than `input.length()` @@ -74,16 +71,10 @@ public class Regex(pattern: String, options: Set) { */ public fun find(input: CharSequence, startIndex: Int = 0): MatchResult? = nativePattern.findNext(input.toString(), startIndex) - @Deprecated("Use find() instead.", ReplaceWith("find(input, startIndex)"), level = DeprecationLevel.ERROR) - public fun match(input: CharSequence, startIndex: Int = 0): MatchResult? = find(input, startIndex) - /** Returns a sequence of all occurrences of a regular expression within the [input] string, beginning at the specified [startIndex]. */ public fun findAll(input: CharSequence, startIndex: Int = 0): Sequence = generateSequence({ find(input, startIndex) }, { match -> match.next() }) - @Deprecated("Use findAll() instead.", ReplaceWith("findAll(input, startIndex)"), level = DeprecationLevel.ERROR) - public fun matchAll(input: CharSequence, startIndex: Int = 0): Sequence = findAll(input, startIndex) - /** * Attempts to match the entire [input] CharSequence against the pattern. * diff --git a/js/js.libraries/src/core/stringsCode.kt b/js/js.libraries/src/core/stringsCode.kt index 71a5972ad5a..07de8c7fed8 100644 --- a/js/js.libraries/src/core/stringsCode.kt +++ b/js/js.libraries/src/core/stringsCode.kt @@ -111,10 +111,6 @@ public fun String.replace(oldValue: String, newValue: String, ignoreCase: Boolea public fun String.replace(oldChar: Char, newChar: Char, ignoreCase: Boolean = false): String = nativeReplace(RegExp(Regex.escape(oldChar.toString()), if (ignoreCase) "gi" else "g"), newChar.toString()) -@Deprecated("Use replaceFirst(String, String) instead.", ReplaceWith("replaceFirst(oldValue, newValue, ignoreCase = ignoreCase)"), level = DeprecationLevel.ERROR) -public fun String.replaceFirstLiteral(oldValue: String, newValue: String, ignoreCase: Boolean = false): String = - nativeReplace(RegExp(Regex.escape(oldValue), if (ignoreCase) "i" else ""), Regex.escapeReplacement(newValue)) - public fun String.replaceFirst(oldValue: String, newValue: String, ignoreCase: Boolean = false): String = nativeReplace(RegExp(Regex.escape(oldValue), if (ignoreCase) "i" else ""), Regex.escapeReplacement(newValue)) diff --git a/js/js.libraries/src/deprecated/qunit/core.kt b/js/js.libraries/src/deprecated/qunit/core.kt deleted file mode 100644 index cd8bad736e5..00000000000 --- a/js/js.libraries/src/deprecated/qunit/core.kt +++ /dev/null @@ -1,9 +0,0 @@ -package QUnit - -/** - * The [QUnit](http://qunitjs.com/) API - */ - -@Deprecated("QUnit.ok is going to be removed from the standard library", level = DeprecationLevel.ERROR) -public external fun ok(actual: Boolean, message: String?): Unit -