Adjust testData to CharSequence.length transformation

This commit is contained in:
Denis Zharkov
2015-10-12 20:29:01 +03:00
committed by Mikhail Glukhikh
parent cb562e7ea5
commit f0e3fd617d
348 changed files with 524 additions and 540 deletions
@@ -2,20 +2,20 @@
fun f() {
var s: String?
s = "a"
var s1 = "" // String ?
var s1 = "" // String ?
if (<!SENSELESS_COMPARISON!>s != null<!>) { // Redundant
s1.length()
s1.length
// We can do smartcast here and below
s1 = <!DEBUG_INFO_SMARTCAST!>s<!>.toString() // return String?
s1.length()
s1.length
s1 = <!DEBUG_INFO_SMARTCAST!>s<!>
s1.length()
s1.length
// It's just an assignment without smartcast
val s2 = s
// But smartcast can be done here
<!DEBUG_INFO_SMARTCAST!>s2<!>.length()
<!DEBUG_INFO_SMARTCAST!>s2<!>.length
// And also here
val s3 = <!DEBUG_INFO_SMARTCAST!>s<!>.toString()
s3.length()
s3.length
}
}