KT-51908 Common MatchGroupCollection.get(name) extension function

This commit is contained in:
Abduqodiri Qurbonzoda
2022-09-21 16:02:34 +03:00
committed by Space Team
parent 448e9fc5e7
commit 175566fe56
5 changed files with 29 additions and 23 deletions
@@ -68,7 +68,7 @@ public actual data class MatchGroup(actual val value: String, val range: IntRang
* for example, when it's not supported by the current platform.
*/
@SinceKotlin("1.7")
public operator fun MatchGroupCollection.get(name: String): MatchGroup? {
public actual operator fun MatchGroupCollection.get(name: String): MatchGroup? {
val namedGroups = this as? MatchNamedGroupCollection
?: throw UnsupportedOperationException("Retrieving groups by name is not supported on this platform.")