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