diff --git a/libraries/stdlib/common/src/kotlin/ExceptionsH.kt b/libraries/stdlib/common/src/kotlin/ExceptionsH.kt index 567441dbe7c..302c475b534 100644 --- a/libraries/stdlib/common/src/kotlin/ExceptionsH.kt +++ b/libraries/stdlib/common/src/kotlin/ExceptionsH.kt @@ -46,13 +46,12 @@ public expect open class IndexOutOfBoundsException : RuntimeException { constructor(message: String?) } -@Suppress("NO_ACTUAL_FOR_EXPECT") // TODO: Introduce typealias in JVM public expect open class ConcurrentModificationException : RuntimeException { constructor() constructor(message: String?) - @Deprecated("The constructor is not supported on all platforms and will be removed from kotlin-stdlib-common soon.") + @Deprecated("The constructor is not supported on all platforms and will be removed from kotlin-stdlib-common soon.", level = DeprecationLevel.ERROR) constructor(message: String?, cause: Throwable?) - @Deprecated("The constructor is not supported on all platforms and will be removed from kotlin-stdlib-common soon.") + @Deprecated("The constructor is not supported on all platforms and will be removed from kotlin-stdlib-common soon.", level = DeprecationLevel.ERROR) constructor(cause: Throwable?) } diff --git a/libraries/stdlib/jvm/runtime/kotlin/TypeAliases.kt b/libraries/stdlib/jvm/runtime/kotlin/TypeAliases.kt index 52c3e525c39..9726ebcd019 100644 --- a/libraries/stdlib/jvm/runtime/kotlin/TypeAliases.kt +++ b/libraries/stdlib/jvm/runtime/kotlin/TypeAliases.kt @@ -24,4 +24,7 @@ package kotlin @SinceKotlin("1.1") public actual typealias NoSuchElementException = java.util.NoSuchElementException +@Suppress("NO_ACTUAL_CLASS_MEMBER_FOR_EXPECTED_CLASS") +@SinceKotlin("1.3") public actual typealias ConcurrentModificationException = java.util.ConcurrentModificationException + @SinceKotlin("1.1") public actual typealias Comparator = java.util.Comparator diff --git a/libraries/stdlib/test/ExceptionTest.kt b/libraries/stdlib/test/ExceptionTest.kt index 78cfc996911..4128e014694 100644 --- a/libraries/stdlib/test/ExceptionTest.kt +++ b/libraries/stdlib/test/ExceptionTest.kt @@ -22,6 +22,7 @@ class ExceptionTest { @Test fun nullPointerException() = testCreateException(::NullPointerException, ::NullPointerException) @Test fun classCastException() = testCreateException(::ClassCastException, ::ClassCastException) @Test fun noSuchElementException() = testCreateException(::NoSuchElementException, ::NoSuchElementException) + @Test fun concurrentModificationException() = testCreateException(::ConcurrentModificationException, ::ConcurrentModificationException) @Test fun arithmeticException() = testCreateException(::ArithmeticException, ::ArithmeticException) @Test fun noWhenBranchMatchedException() = testCreateException(::NoWhenBranchMatchedException, ::NoWhenBranchMatchedException, ::NoWhenBranchMatchedException, ::NoWhenBranchMatchedException)