From e9c4f531ebf22398eadf2c989d14050b5cf22f97 Mon Sep 17 00:00:00 2001 From: Ilya Gorbunov Date: Fri, 19 Jun 2020 00:12:58 +0300 Subject: [PATCH] Increase deprecation level for previously deprecated API - unsupported common exceptions - common 'synchronized' - jquery API - experimental kotlin.time API - js Math object - DefaultAsserter constructor-like fun --- .../webDemoCanvasExamples/Creatures.kt | 2 ++ .../webDemoCanvasExamples/Fancy lines.kt | 1 + .../webDemoCanvasExamples/Hello, Kotlin.kt | 2 ++ .../webDemoCanvasExamples/Traffic light.kt | 2 ++ .../kotlin/kotlin/test/DefaultAsserter.kt | 9 ++++--- .../stdlib/common/src/kotlin/ExceptionsH.kt | 4 +-- libraries/stdlib/common/src/kotlin/KotlinH.kt | 7 ++--- libraries/stdlib/js/src/jquery/common.kt | 25 ++++++++++------- libraries/stdlib/js/src/jquery/ui.kt | 27 +++++++++++-------- libraries/stdlib/js/src/kotlin/js.math.kt | 10 +++---- libraries/stdlib/js/src/kotlin/math.kt | 4 +-- libraries/stdlib/js/src/kotlin/numbers.kt | 4 +-- .../stdlib/src/kotlin/time/TimeSource.kt | 4 +-- .../stdlib/src/kotlin/time/TimeSources.kt | 8 +++--- libraries/stdlib/test/ExceptionTest.kt | 4 +-- 15 files changed, 65 insertions(+), 48 deletions(-) diff --git a/js/js.translator/testData/webDemoCanvasExamples/Creatures.kt b/js/js.translator/testData/webDemoCanvasExamples/Creatures.kt index eaa269cd0f8..4de91bd2753 100644 --- a/js/js.translator/testData/webDemoCanvasExamples/Creatures.kt +++ b/js/js.translator/testData/webDemoCanvasExamples/Creatures.kt @@ -3,6 +3,8 @@ * You can drag'n'drop them as well as the logo. Doubleclick to add * more creatures but be careful. They may be watching you! */ +@file:Suppress("DEPRECATION_ERROR") + package creatures import jquery.* diff --git a/js/js.translator/testData/webDemoCanvasExamples/Fancy lines.kt b/js/js.translator/testData/webDemoCanvasExamples/Fancy lines.kt index 8a370ed2488..44f3d1aca01 100644 --- a/js/js.translator/testData/webDemoCanvasExamples/Fancy lines.kt +++ b/js/js.translator/testData/webDemoCanvasExamples/Fancy lines.kt @@ -3,6 +3,7 @@ This example is based on example from html5 canvas2D docs: http://www.w3.org/TR/2dcontext/ Note that only a subset of the api is supported for now. */ +@file:Suppress("DEPRECATION_ERROR") package fancylines diff --git a/js/js.translator/testData/webDemoCanvasExamples/Hello, Kotlin.kt b/js/js.translator/testData/webDemoCanvasExamples/Hello, Kotlin.kt index b8a0d0d2c73..2b5496749f0 100644 --- a/js/js.translator/testData/webDemoCanvasExamples/Hello, Kotlin.kt +++ b/js/js.translator/testData/webDemoCanvasExamples/Hello, Kotlin.kt @@ -1,6 +1,8 @@ /* This shows simple text floating around. */ +@file:Suppress("DEPRECATION_ERROR") + package hello import jquery.* diff --git a/js/js.translator/testData/webDemoCanvasExamples/Traffic light.kt b/js/js.translator/testData/webDemoCanvasExamples/Traffic light.kt index d19a268bae5..2e05a84cc3d 100644 --- a/js/js.translator/testData/webDemoCanvasExamples/Traffic light.kt +++ b/js/js.translator/testData/webDemoCanvasExamples/Traffic light.kt @@ -2,6 +2,8 @@ * In this example you can see a crossroads. Traffic light change color by timer, * but you can change it manually using controls at the right part of screen. */ +@file:Suppress("DEPRECATION_ERROR") + package traffic import jquery.* diff --git a/libraries/kotlin.test/common/src/main/kotlin/kotlin/test/DefaultAsserter.kt b/libraries/kotlin.test/common/src/main/kotlin/kotlin/test/DefaultAsserter.kt index cff17c8689f..80de732ca1a 100644 --- a/libraries/kotlin.test/common/src/main/kotlin/kotlin/test/DefaultAsserter.kt +++ b/libraries/kotlin.test/common/src/main/kotlin/kotlin/test/DefaultAsserter.kt @@ -1,5 +1,5 @@ /* - * Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ @@ -22,8 +22,11 @@ object DefaultAsserter : Asserter { } } -@Deprecated("DefaultAsserter is an object now, constructor call is not required anymore", - ReplaceWith("DefaultAsserter", "kotlin.test.DefaultAsserter")) +@Deprecated( + "DefaultAsserter is an object now, constructor call is not required anymore", + ReplaceWith("DefaultAsserter", "kotlin.test.DefaultAsserter"), + DeprecationLevel.ERROR +) @kotlin.js.JsName("DefaultAsserterConstructor") @Suppress("FunctionName") fun DefaultAsserter(): DefaultAsserter = DefaultAsserter \ No newline at end of file diff --git a/libraries/stdlib/common/src/kotlin/ExceptionsH.kt b/libraries/stdlib/common/src/kotlin/ExceptionsH.kt index 019fdbec368..b065e0bbe9e 100644 --- a/libraries/stdlib/common/src/kotlin/ExceptionsH.kt +++ b/libraries/stdlib/common/src/kotlin/ExceptionsH.kt @@ -93,7 +93,7 @@ public expect open class ArithmeticException : RuntimeException { constructor(message: String?) } -@Deprecated("This exception type is not supposed to be thrown or caught in common code and will be removed from kotlin-stdlib-common soon.") +@Deprecated("This exception type is not supposed to be thrown or caught in common code and will be removed from kotlin-stdlib-common soon.", level = DeprecationLevel.ERROR) public expect open class NoWhenBranchMatchedException : RuntimeException { constructor() constructor(message: String?) @@ -101,7 +101,7 @@ public expect open class NoWhenBranchMatchedException : RuntimeException { constructor(cause: Throwable?) } -@Deprecated("This exception type is not supposed to be thrown or caught in common code and will be removed from kotlin-stdlib-common soon.") +@Deprecated("This exception type is not supposed to be thrown or caught in common code and will be removed from kotlin-stdlib-common soon.", level = DeprecationLevel.ERROR) public expect class UninitializedPropertyAccessException : RuntimeException { constructor() constructor(message: String?) diff --git a/libraries/stdlib/common/src/kotlin/KotlinH.kt b/libraries/stdlib/common/src/kotlin/KotlinH.kt index 18da30e810c..c53615b466a 100644 --- a/libraries/stdlib/common/src/kotlin/KotlinH.kt +++ b/libraries/stdlib/common/src/kotlin/KotlinH.kt @@ -60,11 +60,8 @@ public expect fun Float.Companion.fromBits(bits: Int): Float // From concurrent.kt -// TODO: promote to error? Otherwise it gets to JVM part -//@Deprecated("Use Volatile annotation from kotlin.jvm package", ReplaceWith("kotlin.jvm.Volatile"), level = DeprecationLevel.WARNING) -//public typealias Volatile = kotlin.jvm.Volatile - -@Deprecated("Synchronization on any object is not supported on every platform and will be removed from the common standard library soon.") +@Deprecated("Synchronization on any object is not supported on every platform and will be removed from the common standard library soon.", level = DeprecationLevel.ERROR) +@Suppress("NO_ACTUAL_FOR_EXPECT") public expect inline fun synchronized(lock: Any, block: () -> R): R diff --git a/libraries/stdlib/js/src/jquery/common.kt b/libraries/stdlib/js/src/jquery/common.kt index 9d01bc087e8..9d8ab38e8ed 100644 --- a/libraries/stdlib/js/src/jquery/common.kt +++ b/libraries/stdlib/js/src/jquery/common.kt @@ -1,9 +1,14 @@ -@file: Suppress("DEPRECATION") +/* + * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + */ + +@file: Suppress("DEPRECATION_ERROR") package jquery import org.w3c.dom.Element -@Deprecated("Use declarations from 'https://bintray.com/kotlin/js-externals/kotlin-js-jquery' package instead.") +@Deprecated("Use declarations from 'https://bintray.com/kotlin/js-externals/kotlin-js-jquery' package instead.", level = DeprecationLevel.ERROR) public external class JQuery() { public fun addClass(className: String): JQuery public fun addClass(f: (Int, String) -> String): JQuery @@ -44,7 +49,7 @@ public external class JQuery() { public fun `val`(): String? } -@Deprecated("Use declarations from 'https://bintray.com/kotlin/js-externals/kotlin-js-jquery' package instead.") +@Deprecated("Use declarations from 'https://bintray.com/kotlin/js-externals/kotlin-js-jquery' package instead.", level = DeprecationLevel.ERROR) open public external class MouseEvent() { public val pageX: Double public val pageY: Double @@ -52,26 +57,26 @@ open public external class MouseEvent() { public fun isDefaultPrevented(): Boolean } -@Deprecated("Use declarations from 'https://bintray.com/kotlin/js-externals/kotlin-js-jquery' package instead.") +@Deprecated("Use declarations from 'https://bintray.com/kotlin/js-externals/kotlin-js-jquery' package instead.", level = DeprecationLevel.ERROR) public external class MouseClickEvent() : MouseEvent { public val which: Int } -@Deprecated("Use declarations from 'https://bintray.com/kotlin/js-externals/kotlin-js-jquery' package instead.") +@Deprecated("Use declarations from 'https://bintray.com/kotlin/js-externals/kotlin-js-jquery' package instead.", level = DeprecationLevel.ERROR) @JsName("$") public external fun jq(selector: String): JQuery -@Deprecated("Use declarations from 'https://bintray.com/kotlin/js-externals/kotlin-js-jquery' package instead.") +@Deprecated("Use declarations from 'https://bintray.com/kotlin/js-externals/kotlin-js-jquery' package instead.", level = DeprecationLevel.ERROR) @JsName("$") public external fun jq(selector: String, context: Element): JQuery -@Deprecated("Use declarations from 'https://bintray.com/kotlin/js-externals/kotlin-js-jquery' package instead.") +@Deprecated("Use declarations from 'https://bintray.com/kotlin/js-externals/kotlin-js-jquery' package instead.", level = DeprecationLevel.ERROR) @JsName("$") public external fun jq(callback: () -> Unit): JQuery -@Deprecated("Use declarations from 'https://bintray.com/kotlin/js-externals/kotlin-js-jquery' package instead.") +@Deprecated("Use declarations from 'https://bintray.com/kotlin/js-externals/kotlin-js-jquery' package instead.", level = DeprecationLevel.ERROR) @JsName("$") public external fun jq(obj: JQuery): JQuery -@Deprecated("Use declarations from 'https://bintray.com/kotlin/js-externals/kotlin-js-jquery' package instead.") +@Deprecated("Use declarations from 'https://bintray.com/kotlin/js-externals/kotlin-js-jquery' package instead.", level = DeprecationLevel.ERROR) @JsName("$") public external fun jq(el: Element): JQuery -@Deprecated("Use declarations from 'https://bintray.com/kotlin/js-externals/kotlin-js-jquery' package instead.") +@Deprecated("Use declarations from 'https://bintray.com/kotlin/js-externals/kotlin-js-jquery' package instead.", level = DeprecationLevel.ERROR) @JsName("$") public external fun jq(): JQuery diff --git a/libraries/stdlib/js/src/jquery/ui.kt b/libraries/stdlib/js/src/jquery/ui.kt index 19c6d63f89a..27d2df77218 100644 --- a/libraries/stdlib/js/src/jquery/ui.kt +++ b/libraries/stdlib/js/src/jquery/ui.kt @@ -1,4 +1,9 @@ -@file: Suppress("DEPRECATION") +/* + * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + */ + +@file: Suppress("DEPRECATION_ERROR") package jquery.ui @@ -6,32 +11,32 @@ package jquery.ui import jquery.JQuery import kotlin.js.Json -@Deprecated("Use declarations from 'https://bintray.com/kotlin/js-externals/kotlin-js-jquery' package instead.") +@Deprecated("Use declarations from 'https://bintray.com/kotlin/js-externals/kotlin-js-jquery' package instead.", level = DeprecationLevel.ERROR) public inline fun JQuery.buttonset(): JQuery = asDynamic().buttonset() -@Deprecated("Use declarations from 'https://bintray.com/kotlin/js-externals/kotlin-js-jquery' package instead.") +@Deprecated("Use declarations from 'https://bintray.com/kotlin/js-externals/kotlin-js-jquery' package instead.", level = DeprecationLevel.ERROR) public inline fun JQuery.dialog(): JQuery = asDynamic().dialog() -@Deprecated("Use declarations from 'https://bintray.com/kotlin/js-externals/kotlin-js-jquery' package instead.") +@Deprecated("Use declarations from 'https://bintray.com/kotlin/js-externals/kotlin-js-jquery' package instead.", level = DeprecationLevel.ERROR) public inline fun JQuery.dialog(params: Json): JQuery = asDynamic().dialog(params) -@Deprecated("Use declarations from 'https://bintray.com/kotlin/js-externals/kotlin-js-jquery' package instead.") +@Deprecated("Use declarations from 'https://bintray.com/kotlin/js-externals/kotlin-js-jquery' package instead.", level = DeprecationLevel.ERROR) public inline fun JQuery.dialog(mode: String, param: String): Any? = asDynamic().dialog(mode, param) -@Deprecated("Use declarations from 'https://bintray.com/kotlin/js-externals/kotlin-js-jquery' package instead.") +@Deprecated("Use declarations from 'https://bintray.com/kotlin/js-externals/kotlin-js-jquery' package instead.", level = DeprecationLevel.ERROR) public inline fun JQuery.dialog(mode: String): JQuery = asDynamic().dialog(mode) -@Deprecated("Use declarations from 'https://bintray.com/kotlin/js-externals/kotlin-js-jquery' package instead.") +@Deprecated("Use declarations from 'https://bintray.com/kotlin/js-externals/kotlin-js-jquery' package instead.", level = DeprecationLevel.ERROR) public inline fun JQuery.dialog(mode: String, param: String, value: Any?): JQuery = asDynamic().dialog(mode, param, value) -@Deprecated("Use declarations from 'https://bintray.com/kotlin/js-externals/kotlin-js-jquery' package instead.") +@Deprecated("Use declarations from 'https://bintray.com/kotlin/js-externals/kotlin-js-jquery' package instead.", level = DeprecationLevel.ERROR) public inline fun JQuery.button(): JQuery = asDynamic().button() -@Deprecated("Use declarations from 'https://bintray.com/kotlin/js-externals/kotlin-js-jquery' package instead.") +@Deprecated("Use declarations from 'https://bintray.com/kotlin/js-externals/kotlin-js-jquery' package instead.", level = DeprecationLevel.ERROR) public inline fun JQuery.accordion(): JQuery = asDynamic().accordion() -@Deprecated("Use declarations from 'https://bintray.com/kotlin/js-externals/kotlin-js-jquery' package instead.") +@Deprecated("Use declarations from 'https://bintray.com/kotlin/js-externals/kotlin-js-jquery' package instead.", level = DeprecationLevel.ERROR) public inline fun JQuery.draggable(params: Json): JQuery = asDynamic().draggable(params) -@Deprecated("Use declarations from 'https://bintray.com/kotlin/js-externals/kotlin-js-jquery' package instead.") +@Deprecated("Use declarations from 'https://bintray.com/kotlin/js-externals/kotlin-js-jquery' package instead.", level = DeprecationLevel.ERROR) public inline fun JQuery.selectable(): JQuery = asDynamic().selectable() diff --git a/libraries/stdlib/js/src/kotlin/js.math.kt b/libraries/stdlib/js/src/kotlin/js.math.kt index 50d0f4465b1..9a384e7c677 100644 --- a/libraries/stdlib/js/src/kotlin/js.math.kt +++ b/libraries/stdlib/js/src/kotlin/js.math.kt @@ -1,5 +1,5 @@ /* - * Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ @@ -8,11 +8,11 @@ package kotlin.js /** * Exposes the JavaScript [Math object](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Math) to Kotlin. */ -@Deprecated("Use top-level functions from kotlin.math package instead.", level = DeprecationLevel.WARNING) +@Deprecated("Use top-level functions from kotlin.math package instead.", level = DeprecationLevel.ERROR) public external object Math { @Deprecated("Use kotlin.math.PI instead.", ReplaceWith("PI", "kotlin.math.PI"), level = DeprecationLevel.ERROR) public val PI: Double - @Deprecated("Use Random.nextDouble instead", ReplaceWith("kotlin.random.Random.nextDouble()", "kotlin.random.Random"), level = DeprecationLevel.WARNING) + @Deprecated("Use Random.nextDouble instead", ReplaceWith("kotlin.random.Random.nextDouble()", "kotlin.random.Random"), level = DeprecationLevel.ERROR) public fun random(): Double @Deprecated("Use kotlin.math.abs instead.", ReplaceWith("abs(value)", "kotlin.math.abs"), level = DeprecationLevel.ERROR) public fun abs(value: Double): Double @@ -95,13 +95,13 @@ public external object Math { /** * Returns the smaller of two values. */ -@Suppress("DEPRECATION") +@Suppress("DEPRECATION_ERROR") @Deprecated("Use minOf or kotlin.math.min instead", ReplaceWith("minOf(a, b)"), level = DeprecationLevel.ERROR) public fun Math.min(a: Long, b: Long): Long = if (a <= b) a else b /** * Returns the greater of two values. */ -@Suppress("DEPRECATION") +@Suppress("DEPRECATION_ERROR") @Deprecated("Use maxOf or kotlin.math.max instead", ReplaceWith("maxOf(a, b)"), level = DeprecationLevel.ERROR) public fun Math.max(a: Long, b: Long): Long = if (a >= b) a else b diff --git a/libraries/stdlib/js/src/kotlin/math.kt b/libraries/stdlib/js/src/kotlin/math.kt index f96e74f447f..89192898c77 100644 --- a/libraries/stdlib/js/src/kotlin/math.kt +++ b/libraries/stdlib/js/src/kotlin/math.kt @@ -1,8 +1,8 @@ /* - * Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ -@file:Suppress("DEPRECATION", "DEPRECATION_ERROR") +@file:Suppress("DEPRECATION_ERROR") package kotlin.math diff --git a/libraries/stdlib/js/src/kotlin/numbers.kt b/libraries/stdlib/js/src/kotlin/numbers.kt index 8bbfa427769..56dfdf97b89 100644 --- a/libraries/stdlib/js/src/kotlin/numbers.kt +++ b/libraries/stdlib/js/src/kotlin/numbers.kt @@ -1,5 +1,5 @@ /* - * Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ @@ -59,7 +59,7 @@ public actual fun Int.countOneBits(): Int { */ @SinceKotlin("1.4") @WasExperimental(ExperimentalStdlibApi::class) -@Suppress("DEPRECATION") +@Suppress("DEPRECATION_ERROR") @kotlin.internal.InlineOnly public actual inline fun Int.countLeadingZeroBits(): Int = kotlin.js.Math.clz32(this) diff --git a/libraries/stdlib/src/kotlin/time/TimeSource.kt b/libraries/stdlib/src/kotlin/time/TimeSource.kt index 061f7b5f612..1b31301b633 100644 --- a/libraries/stdlib/src/kotlin/time/TimeSource.kt +++ b/libraries/stdlib/src/kotlin/time/TimeSource.kt @@ -118,10 +118,10 @@ private class AdjustedTimeMark(val mark: TimeMark, val adjustment: Duration) : T @SinceKotlin("1.3") @ExperimentalTime -@Deprecated("Use TimeSource interface instead.", ReplaceWith("TimeSource", "kotlin.time.TimeSource")) +@Deprecated("Use TimeSource interface instead.", ReplaceWith("TimeSource", "kotlin.time.TimeSource"), DeprecationLevel.ERROR) public typealias Clock = TimeSource @SinceKotlin("1.3") @ExperimentalTime -@Deprecated("Use TimeMark class instead.", ReplaceWith("TimeMark", "kotlin.time.TimeMark")) +@Deprecated("Use TimeMark class instead.", ReplaceWith("TimeMark", "kotlin.time.TimeMark"), DeprecationLevel.ERROR) public typealias ClockMark = TimeMark diff --git a/libraries/stdlib/src/kotlin/time/TimeSources.kt b/libraries/stdlib/src/kotlin/time/TimeSources.kt index 33b0b5d0633..d5e5da5dfbc 100644 --- a/libraries/stdlib/src/kotlin/time/TimeSources.kt +++ b/libraries/stdlib/src/kotlin/time/TimeSources.kt @@ -106,20 +106,20 @@ public class TestTimeSource : AbstractLongTimeSource(unit = DurationUnit.NANOSEC @SinceKotlin("1.3") @ExperimentalTime -@Deprecated("Use TimeSource.Monotonic instead.", ReplaceWith("TimeSource.Monotonic", "kotlin.time.TimeSource")) +@Deprecated("Use TimeSource.Monotonic instead.", ReplaceWith("TimeSource.Monotonic", "kotlin.time.TimeSource"), DeprecationLevel.ERROR) public typealias MonoClock = TimeSource.Monotonic @SinceKotlin("1.3") @ExperimentalTime -@Deprecated("Use AbstractLongTimeSource instead.", ReplaceWith("AbstractLongTimeSource", "kotlin.time.AbstractLongTimeSource")) +@Deprecated("Use AbstractLongTimeSource instead.", ReplaceWith("AbstractLongTimeSource", "kotlin.time.AbstractLongTimeSource"), DeprecationLevel.ERROR) public typealias AbstractLongClock = AbstractLongTimeSource @SinceKotlin("1.3") @ExperimentalTime -@Deprecated("Use AbstractDoubleTimeSource instead.", ReplaceWith("AbstractDoubleTimeSource", "kotlin.time.AbstractDoubleTimeSource")) +@Deprecated("Use AbstractDoubleTimeSource instead.", ReplaceWith("AbstractDoubleTimeSource", "kotlin.time.AbstractDoubleTimeSource"), DeprecationLevel.ERROR) public typealias AbstractDoubleClock = AbstractDoubleTimeSource @SinceKotlin("1.3") @ExperimentalTime -@Deprecated("Use TestTimeSource instead.", ReplaceWith("TestTimeSource", "kotlin.time.TestTimeSource")) +@Deprecated("Use TestTimeSource instead.", ReplaceWith("TestTimeSource", "kotlin.time.TestTimeSource"), DeprecationLevel.ERROR) public typealias TestClock = TestTimeSource diff --git a/libraries/stdlib/test/ExceptionTest.kt b/libraries/stdlib/test/ExceptionTest.kt index 17230799942..612bf2e70e5 100644 --- a/libraries/stdlib/test/ExceptionTest.kt +++ b/libraries/stdlib/test/ExceptionTest.kt @@ -26,8 +26,8 @@ class ExceptionTest { @Test fun concurrentModificationException() = testCreateException(::ConcurrentModificationException, ::ConcurrentModificationException) @Test fun arithmeticException() = testCreateException(::ArithmeticException, ::ArithmeticException) - @Test fun noWhenBranchMatchedException() = testCreateException(::NoWhenBranchMatchedException, ::NoWhenBranchMatchedException, ::NoWhenBranchMatchedException, ::NoWhenBranchMatchedException) - @Test fun uninitializedPropertyAccessException() = testCreateException(::UninitializedPropertyAccessException, ::UninitializedPropertyAccessException, ::UninitializedPropertyAccessException, ::UninitializedPropertyAccessException) + @Test fun noWhenBranchMatchedException() = @Suppress("DEPRECATION_ERROR") testCreateException(::NoWhenBranchMatchedException, ::NoWhenBranchMatchedException, ::NoWhenBranchMatchedException, ::NoWhenBranchMatchedException) + @Test fun uninitializedPropertyAccessException() = @Suppress("DEPRECATION_ERROR") testCreateException(::UninitializedPropertyAccessException, ::UninitializedPropertyAccessException, ::UninitializedPropertyAccessException, ::UninitializedPropertyAccessException) @Test fun assertionError() = testCreateException(::AssertionError, ::AssertionError, ::AssertionError)