diff --git a/js/js.libraries/src/core/regex.kt b/js/js.libraries/src/core/regex.kt index edcc96394e5..dd2946c6c3b 100644 --- a/js/js.libraries/src/core/regex.kt +++ b/js/js.libraries/src/core/regex.kt @@ -1,5 +1,5 @@ /* - * Copyright 2010-2015 JetBrains s.r.o. + * Copyright 2010-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -225,19 +225,4 @@ private fun RegExp.findNext(input: String, from: Int): MatchResult? { override fun next(): MatchResult? = this@findNext.findNext(input, if (range.isEmpty()) range.start + 1 else range.endInclusive + 1) } -} - -// TODO: Move into MatchResult after KT-4124 is implemented -public class Destructured internal constructor(public val match: MatchResult) { - public operator inline fun component1(): String = match.groupValues[1] - public operator inline fun component2(): String = match.groupValues[2] - public operator inline fun component3(): String = match.groupValues[3] - public operator inline fun component4(): String = match.groupValues[4] - public operator inline fun component5(): String = match.groupValues[5] - public operator inline fun component6(): String = match.groupValues[6] - public operator inline fun component7(): String = match.groupValues[7] - public operator inline fun component8(): String = match.groupValues[8] - public operator inline fun component9(): String = match.groupValues[9] - public operator inline fun component10(): String = match.groupValues[10] - public fun toList(): List = match.groupValues.drop(1) -} +} \ No newline at end of file diff --git a/libraries/stdlib/src/kotlin/text/regex/MatchResult.kt b/libraries/stdlib/src/kotlin/text/regex/MatchResult.kt index 39fbad3e0ab..aa8d97fc6fe 100644 --- a/libraries/stdlib/src/kotlin/text/regex/MatchResult.kt +++ b/libraries/stdlib/src/kotlin/text/regex/MatchResult.kt @@ -1,5 +1,5 @@ /* - * Copyright 2010-2015 JetBrains s.r.o. + * Copyright 2010-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -91,8 +91,6 @@ public interface MatchResult { * If the group in the regular expression is optional and there were no match captured by that group, * corresponding component value is an empty string. */ - @Suppress("NOTHING_TO_INLINE") - @kotlin.jvm.JvmVersion public class Destructured internal constructor(public val match: MatchResult) { @kotlin.internal.InlineOnly public operator inline fun component1(): String = match.groupValues[1]