From 1a8b258d86b271b357348ab5cf8019127c985705 Mon Sep 17 00:00:00 2001 From: Ilya Gorbunov Date: Thu, 6 Sep 2018 05:01:09 +0300 Subject: [PATCH] Raise deprecation level for map delegation accessor according to #KT-18789 #KT-21703 --- libraries/stdlib/src/kotlin/collections/MapAccessors.kt | 2 +- .../stdlib/test/properties/delegation/MapAccessorsTest.kt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/stdlib/src/kotlin/collections/MapAccessors.kt b/libraries/stdlib/src/kotlin/collections/MapAccessors.kt index c63fb185857..8f87717a328 100644 --- a/libraries/stdlib/src/kotlin/collections/MapAccessors.kt +++ b/libraries/stdlib/src/kotlin/collections/MapAccessors.kt @@ -35,7 +35,7 @@ public inline operator fun Map.getValue(thisRef public inline operator fun MutableMap.getValue(thisRef: Any?, property: KProperty<*>): V1 = @Suppress("UNCHECKED_CAST") (getOrImplicitDefault(property.name) as V1) -@Deprecated("Use getValue() with two type parameters instead") +@Deprecated("Use getValue() with two type parameters instead", level = DeprecationLevel.ERROR) @kotlin.jvm.JvmName("getVarContravariant") @kotlin.internal.LowPriorityInOverloadResolution @kotlin.internal.InlineOnly diff --git a/libraries/stdlib/test/properties/delegation/MapAccessorsTest.kt b/libraries/stdlib/test/properties/delegation/MapAccessorsTest.kt index cfe17dbdc6c..59fc803f368 100644 --- a/libraries/stdlib/test/properties/delegation/MapAccessorsTest.kt +++ b/libraries/stdlib/test/properties/delegation/MapAccessorsTest.kt @@ -72,11 +72,11 @@ class VarByMapExtensionsTest { @Test fun deprecatedAccessors() { assertEquals( expected = map.getValue(this, VarByMapExtensionsTest::c), - actual = map.getValue(this, VarByMapExtensionsTest::c) + actual = @Suppress("DEPRECATION_ERROR") map.getValue(this, VarByMapExtensionsTest::c) ) assertEquals( expected = map2.getValue(this, VarByMapExtensionsTest::a2), - actual = map2.getValue(this, VarByMapExtensionsTest::a2) + actual = @Suppress("DEPRECATION_ERROR") map2.getValue(this, VarByMapExtensionsTest::a2) ) } } \ No newline at end of file