[Tests] Update test data with error suppression warnings

#KT-61129 Fixed
This commit is contained in:
Kirill Rakhman
2023-08-14 13:14:04 +02:00
committed by Space Team
parent 969c716c76
commit 5b9c35de2e
88 changed files with 889 additions and 87 deletions
@@ -0,0 +1,10 @@
import kotlin.reflect.KClass
typealias MyString = String
fun test(k: KClass<out MyString>) {
k::class.java
}
@Suppress(<!ERROR_SUPPRESSION!>"UPPER_BOUND_VIOLATED"<!>)
public val <T> KClass<T>.java: Class<T> get() = TODO()
@@ -1,5 +1,3 @@
// FIR_IDENTICAL
import kotlin.reflect.KClass
typealias MyString = String
@@ -41,7 +41,7 @@ fun test(i: Inv<Nothing>, iUnit: Inv<Unit>) {
run(A.flexible(iUnit)) { 42 }
}
launch {
@Suppress("UNSUPPORTED")
@Suppress(<!ERROR_SUPPRESSION!>"UNSUPPORTED"<!>)
run<dynamic> { "" }
}
@@ -4,7 +4,7 @@ interface A
interface B : A
interface C : A
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER", "HIDDEN")
@Suppress(<!ERROR_SUPPRESSION!>"INVISIBLE_REFERENCE"<!>, "INVISIBLE_MEMBER", "HIDDEN")
fun <K> select(x: K, y: K): @kotlin.internal.Exact K = x
fun foo(a: Any) {}
@@ -4,7 +4,7 @@ interface A
interface B : A
interface C : A
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER", "HIDDEN")
@Suppress(<!ERROR_SUPPRESSION!>"INVISIBLE_REFERENCE"<!>, "INVISIBLE_MEMBER", "HIDDEN")
fun <K> select(x: K, y: K): @kotlin.internal.Exact K = x
fun foo(a: Any) {}
@@ -4,7 +4,7 @@ interface ISample
fun <K> elvisSimple(x: K?, y: K): K = y
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER", "HIDDEN")
@Suppress(<!ERROR_SUPPRESSION!>"INVISIBLE_REFERENCE"<!>, "INVISIBLE_MEMBER", "HIDDEN")
fun <K> elvisExact(x: K?, y: K): @kotlin.internal.Exact K = y
fun <T : Number> materialize(): T? = TODO()
@@ -4,7 +4,7 @@ interface ISample
fun <K> elvisSimple(x: K?, y: K): K = y
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER", "HIDDEN")
@Suppress(<!ERROR_SUPPRESSION!>"INVISIBLE_REFERENCE"<!>, "INVISIBLE_MEMBER", "HIDDEN")
fun <K> elvisExact(x: K?, y: K): @kotlin.internal.Exact K = y
fun <T : Number> materialize(): T? = null
@@ -1,6 +1,6 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER
@file:Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
@file:Suppress("INVISIBLE_MEMBER", <!ERROR_SUPPRESSION!>"INVISIBLE_REFERENCE"<!>)
import kotlin.internal.Exact
@@ -0,0 +1,15 @@
// WITH_STDLIB
// !DIAGNOSTICS: -UNUSED_PARAMETER
@file:Suppress("INVISIBLE_MEMBER", <!ERROR_SUPPRESSION!>"INVISIBLE_REFERENCE"<!>)
import kotlin.internal.OnlyInputTypes
fun <@OnlyInputTypes T> assertEquals(expected: T, actual: T, message: String? = null) {}
fun main() {
assertEquals(
mapOf(1 to "1", 2 to "2", 3 to "3"),
intArrayOf(1, 2, 3).associateWith { it.toString() }
)
}
@@ -1,4 +1,3 @@
// FIR_IDENTICAL
// WITH_STDLIB
// !DIAGNOSTICS: -UNUSED_PARAMETER