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
+4 -4
View File
@@ -13,12 +13,12 @@
fun foo(x: Int) = x
fun test0(flag: Boolean) {
foo(<!TYPE_MISMATCH{NI}!>if (flag) <!CONSTANT_EXPECTED_TYPE_MISMATCH{OI}!>true<!> else <!TYPE_MISMATCH{OI}!>""<!><!>)
foo(<!TYPE_MISMATCH!>if (flag) true else ""<!>)
}
fun test1(flag: Boolean) {
foo(<!TYPE_MISMATCH{NI}!>when (flag) {
true -> <!CONSTANT_EXPECTED_TYPE_MISMATCH{OI}!>true<!>
else -> <!TYPE_MISMATCH{OI}!>""<!>
foo(<!TYPE_MISMATCH!>when (flag) {
true -> true
else -> ""
}<!>)
}
+2 -3
View File
@@ -24,7 +24,7 @@ class ListData<T : Item>(val list: List<T>) : Data
fun <T> listOf(vararg items: T): List<T> = null!!
fun test1(o: Any) = <!TYPE_INFERENCE_FAILED_ON_SPECIAL_CONSTRUCT{OI}!>when<!> (o) {
fun test1(o: Any) = when (o) {
is List<*> ->
ListData(listOf())
is Int -> when {
@@ -51,7 +51,7 @@ fun test1x(o: Any): Data? = when (o) {
}
fun test2() =
<!TYPE_INFERENCE_FAILED_ON_SPECIAL_CONSTRUCT{OI}!>if<!> (true)
if (true)
ListData(listOf())
else
FlagData(true)
@@ -64,4 +64,3 @@ fun test2y(): Any =
fun test2z(): Any =
run { if (true) ListData(listOf()) else FlagData(true) }
+2 -2
View File
@@ -1,7 +1,7 @@
val test: Int = if (true) <!TYPE_MISMATCH{NI}!>{
val test: Int = if (true) <!TYPE_MISMATCH!>{
when (2) {
1 -> 1
else -> <!NULL_FOR_NONNULL_TYPE{OI}!>null<!>
else -> null
}
}<!>
else {
+5 -5
View File
@@ -10,18 +10,18 @@
*/
fun test1(): Int {
val x: String = if (true) <!TYPE_MISMATCH{NI}!>{
val x: String = if (true) <!TYPE_MISMATCH!>{
when {
true -> <!TYPE_MISMATCH{OI}!>Any()<!>
else -> <!NULL_FOR_NONNULL_TYPE{OI}!>null<!>
true -> Any()
else -> null
}
}<!> else ""
return x.hashCode()
}
fun test2(): Int {
val x: String = <!TYPE_MISMATCH{NI}, TYPE_MISMATCH{NI}!>when {
true -> <!TYPE_MISMATCH{OI}!>Any()<!>
val x: String = <!TYPE_MISMATCH, TYPE_MISMATCH!>when {
true -> Any()
else -> null
} ?: return 0<!>
return x.hashCode()
@@ -29,6 +29,6 @@ val test3: (String) -> Boolean =
val test4: (String) -> Boolean =
when {
true -> <!TYPE_MISMATCH{NI}!>{ <!EXPECTED_PARAMETERS_NUMBER_MISMATCH!>s1, <!CANNOT_INFER_PARAMETER_TYPE!>s2<!><!> -> true }<!>
true -> <!TYPE_MISMATCH!>{ <!EXPECTED_PARAMETERS_NUMBER_MISMATCH!>s1, <!CANNOT_INFER_PARAMETER_TYPE!>s2<!><!> -> true }<!>
else -> null!!
}
@@ -11,8 +11,8 @@
* overload-resolution, determining-function-applicability-for-a-specific-call, description -> paragraph 1 -> sentence 3
*/
val <!IMPLICIT_NOTHING_PROPERTY_TYPE{OI}!>test1<!> = when {
true -> { <!TYPE_MISMATCH{OI}!>{ true }<!> }
val test1 = when {
true -> { { true } }
else -> TODO()
}
@@ -21,10 +21,10 @@ val test1a: () -> Boolean = when {
else -> TODO()
}
val <!IMPLICIT_NOTHING_PROPERTY_TYPE{OI}!>test2<!> = when {
true -> { <!TYPE_MISMATCH{OI}!>{ true }<!> }
val test2 = when {
true -> { { true } }
else -> when {
true -> { <!TYPE_MISMATCH{OI}!>{ true }<!> }
true -> { { true } }
else -> TODO()
}
}
@@ -32,14 +32,14 @@ val <!IMPLICIT_NOTHING_PROPERTY_TYPE{OI}!>test2<!> = when {
val test2a: () -> Boolean = when {
true -> { { true } }
else -> when {
true -> { <!TYPE_MISMATCH{OI}!>{ true }<!> } // TODO
true -> { { true } } // TODO
else -> TODO()
}
}
val <!IMPLICIT_NOTHING_PROPERTY_TYPE{OI}!>test3<!> = when {
true -> { <!TYPE_MISMATCH{OI}!>{ true }<!> }
true -> { <!TYPE_MISMATCH{OI}!>{ true }<!> }
val test3 = when {
true -> { { true } }
true -> { { true } }
else -> TODO()
}