From 2ae767a049a2319ae4e92e93373912d0ae50d450 Mon Sep 17 00:00:00 2001 From: Ilya Gorbunov Date: Sat, 11 Apr 2015 03:04:08 +0300 Subject: [PATCH] Add deprecated matcher() method to Regex to fix build. --- libraries/stdlib/src/kotlin/text/regex/RegexJVM.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libraries/stdlib/src/kotlin/text/regex/RegexJVM.kt b/libraries/stdlib/src/kotlin/text/regex/RegexJVM.kt index 5b0e8c814ff..220a73527bc 100644 --- a/libraries/stdlib/src/kotlin/text/regex/RegexJVM.kt +++ b/libraries/stdlib/src/kotlin/text/regex/RegexJVM.kt @@ -103,6 +103,9 @@ public class Regex( /* visibility? */ public val nativePattern: Pattern) { /** The set of options that were used to create this regular expression. */ public val options: Set = fromInt(nativePattern.flags(), RegexOption.values()) + deprecated("To get the Matcher from java.util.regex.Pattern use toPattern to convert string to Pattern, or migrate to Regex API") + public fun matcher(input: CharSequence): Matcher = nativePattern.matcher(input) + /** Indicates whether the regular expression matches the entire [input]. */ public fun matches(input: CharSequence): Boolean = nativePattern.matcher(input).matches()