Add diagnostics to test data from NI

This commit is contained in:
Mikhail Zarechenskiy
2017-11-22 08:50:30 +03:00
parent a71238bf94
commit 8757298994
480 changed files with 1136 additions and 1120 deletions
+7 -7
View File
@@ -1,18 +1,18 @@
// !WITH_NEW_INFERENCE
fun test1(): Int {
val x: String = if (true) {
val x: String = if (true) <!NI;TYPE_MISMATCH, NI;TYPE_MISMATCH, NI;TYPE_MISMATCH, NI;TYPE_MISMATCH!>{
when {
true -> <!TYPE_MISMATCH!>Any()<!>
else -> <!NULL_FOR_NONNULL_TYPE!>null<!>
true -> <!OI;TYPE_MISMATCH!>Any()<!>
else -> <!OI;NULL_FOR_NONNULL_TYPE!>null<!>
}
} else ""
}<!> else ""
return x.hashCode()
}
fun test2(): Int {
val x: String = when {
true -> <!TYPE_MISMATCH!>Any()<!>
val x: String = <!NI;TYPE_MISMATCH, NI;TYPE_MISMATCH!>when {
true -> <!OI;TYPE_MISMATCH!>Any()<!>
else -> null
} ?: return 0
} ?: return 0<!>
return x.hashCode()
}