f38c0cf348
Similarly to FIR diagnostic tests. This commit enable all available test data and check the reported error messages by FIR. This helps identify some issues in formatting of FIR diagnostics. The changes on the test file are mechanically generated. Failed tests are disabled with `// IGNORE_FIR` and are re-enabled in the second commit.
20 lines
436 B
Kotlin
Vendored
20 lines
436 B
Kotlin
Vendored
// FIR_IDENTICAL
|
|
|
|
// COMPILER_ARGUMENTS: -XXLanguage:-NewInference
|
|
|
|
fun foo(s: String) = s.length
|
|
|
|
fun baz(s: String?, r: String?): Int {
|
|
return foo(r ?: when {
|
|
s != null -> <info descr="Smart cast to kotlin.String">s</info>
|
|
else -> ""
|
|
})
|
|
}
|
|
|
|
fun bar(s: String?, r: String?): Int {
|
|
return (r ?: when {
|
|
s != null -> <info descr="Smart cast to kotlin.String">s</info>
|
|
else -> ""
|
|
}).length
|
|
}
|