FIR: Mark a pack of tests (53) as FIR_IDENTICAL

This commit is contained in:
Denis.Zharkov
2021-05-24 13:01:57 +03:00
committed by teamcityserver
parent ddbdfafa79
commit dac9d7b17a
106 changed files with 53 additions and 1057 deletions
@@ -1,9 +0,0 @@
// NI_EXPECTED_FILE
val test1 = { if (true) 1 else "" }
val test2 = { { if (true) 1 else "" } }
val test3: (Boolean) -> Any = { if (it) 1 else "" }
val test4: (Boolean) -> Any? = { if (it) 1 else "" }
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// NI_EXPECTED_FILE
val test1 = { if (true) 1 else "" }
@@ -1,15 +0,0 @@
// !DIAGNOSTICS: -UNUSED_EXPRESSION
fun use(a: Any?) = a
fun test() {
{ }<!NOT_NULL_ASSERTION_ON_LAMBDA_EXPRESSION!>!!<!>
use({ }<!NOT_NULL_ASSERTION_ON_LAMBDA_EXPRESSION!>!!<!>);
// KT-KT-9070
{ } <!USELESS_ELVIS!>?: 1<!>
use({ 2 } <!USELESS_ELVIS!>?: 1<!>);
1 <!USELESS_ELVIS!>?: { }<!>
use(1 <!USELESS_ELVIS!>?: { }<!>)
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// !DIAGNOSTICS: -UNUSED_EXPRESSION
fun use(a: Any?) = a
@@ -1,18 +0,0 @@
// NI_EXPECTED_FILE
val test1 = { when (true) { true -> 1; else -> "" } }
val test2 = { { when (true) { true -> 1; else -> "" } } }
val test3: (Boolean) -> Any = { when (true) { true -> 1; else -> "" } }
val test4: (Boolean) -> Any? = { when (true) { true -> 1; else -> "" } }
fun println() {}
val test5 = {
when (true) {
true -> println()
else -> println()
}
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// NI_EXPECTED_FILE
val test1 = { when (true) { true -> 1; else -> "" } }