Remove OI/NI attributes from test data

This commit is contained in:
Denis.Zharkov
2021-05-24 12:42:39 +03:00
committed by teamcityserver
parent 2ecba6ac39
commit ddbdfafa79
441 changed files with 1005 additions and 1037 deletions
@@ -5,7 +5,7 @@ fun runWithoutReturn(r: () -> Unit) = r()
fun testRun() {
run {
1 <!USELESS_CAST!>as Any<!>
1 <!USELESS_CAST{NI}!>as Any<!>
1 <!USELESS_CAST!>as Any<!>
}
run<Any> {
@@ -16,11 +16,11 @@ fun testRun() {
fun foo(): Int = 1
run {
foo() <!USELESS_CAST{NI}!>as Any<!>
foo() <!USELESS_CAST!>as Any<!>
}
run {
(if (true) 1 else 2) <!USELESS_CAST{NI}!>as Any<!>
(if (true) 1 else 2) <!USELESS_CAST!>as Any<!>
}
run<Int?> {
@@ -35,17 +35,17 @@ fun testRun() {
}
fun testReturn(): Number {
run { 1 <!USELESS_CAST{NI}!>as Number<!> }
run { 1 <!USELESS_CAST!>as Number<!> }
return run { 1 <!USELESS_CAST!>as Number<!> }
}
fun <T> testDependent() {
listOf(1).map {
it <!USELESS_CAST!>as Any<!>
it <!USELESS_CAST{NI}!>as Any<!>
it <!USELESS_CAST!>as Any<!>
}
listOf<T>().map { it <!USELESS_CAST{NI}!>as Any?<!> }
listOf<T>().map { it <!USELESS_CAST!>as Any?<!> }
}
fun <T> listOf(vararg elements: T): List<T> = TODO()
@@ -10,7 +10,7 @@ fun test(x: Int?) {
val a7: Number? = 1 <!USELESS_CAST!>as? Number<!>
run { x <!USELESS_CAST!>as? Int<!> }
run { x <!USELESS_CAST{NI}!>as? Number<!> }
run { x <!USELESS_CAST!>as? Number<!> }
foo(x as? Number)
+1 -1
View File
@@ -1,6 +1,6 @@
class Array<E>(e: E) {
val k = Array(1) {
1 <!USELESS_CAST!>as Any<!>
e <!USELESS_CAST{NI}!>as Any?<!>
e <!USELESS_CAST!>as Any?<!>
}
}