added info about smart casts to diagnostic tests

This commit is contained in:
Svetlana Isakova
2013-12-06 20:12:41 +04:00
parent 00da5fe1fb
commit c30259dfbe
116 changed files with 383 additions and 348 deletions
@@ -3,27 +3,27 @@ fun bar(x: Int): Int = x + 1
fun foo() {
val x: Int? = null
bar(if (x == null) 0 else x)
bar(if (x == null) 0 else <!DEBUG_INFO_AUTOCAST!>x<!>)
if (x == null) {
bar(<!TYPE_MISMATCH!>x<!>)
return
} else {
bar(x)
bar(<!DEBUG_INFO_AUTOCAST!>x<!>)
}
bar(x)
bar(<!DEBUG_INFO_AUTOCAST!>x<!>)
val y: Int? = null
if (y is Int) {
bar(y)
bar(<!DEBUG_INFO_AUTOCAST!>y<!>)
} else {
bar(<!TYPE_MISMATCH!>y<!>)
return
}
bar(y)
bar(<!DEBUG_INFO_AUTOCAST!>y<!>)
val z: Int? = null
if (z != null) bar(z)
if (z != null) bar(<!DEBUG_INFO_AUTOCAST!>z<!>)
bar(<!TYPE_MISMATCH!>z<!>)
bar(z!!)
if (<!SENSELESS_COMPARISON!>z != null<!>) bar(z<!UNNECESSARY_NOT_NULL_ASSERTION!>!!<!>)