Raise deprecation level for map delegation accessor according to #KT-18789

#KT-21703
This commit is contained in:
Ilya Gorbunov
2018-09-06 05:01:09 +03:00
parent 8f209fa667
commit 1a8b258d86
2 changed files with 3 additions and 3 deletions
@@ -35,7 +35,7 @@ public inline operator fun <V, V1 : V> Map<in String, @Exact V>.getValue(thisRef
public inline operator fun <V, V1 : V> MutableMap<in String, out @Exact V>.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
@@ -72,11 +72,11 @@ class VarByMapExtensionsTest {
@Test fun deprecatedAccessors() {
assertEquals<Int>(
expected = map.getValue(this, VarByMapExtensionsTest::c),
actual = map.getValue<Int>(this, VarByMapExtensionsTest::c)
actual = @Suppress("DEPRECATION_ERROR") map.getValue<Int>(this, VarByMapExtensionsTest::c)
)
assertEquals<String>(
expected = map2.getValue<CharSequence, String>(this, VarByMapExtensionsTest::a2),
actual = map2.getValue<String>(this, VarByMapExtensionsTest::a2)
actual = @Suppress("DEPRECATION_ERROR") map2.getValue<String>(this, VarByMapExtensionsTest::a2)
)
}
}