Fix tests in DiagnosticsTestWithStdLibGenerated with NI

This commit is contained in:
Dmitriy Novozhilov
2019-01-30 13:08:22 +03:00
parent 98810ba750
commit 0501a108c0
73 changed files with 507 additions and 218 deletions
@@ -1,37 +1,38 @@
// !WITH_NEW_INFERENCE
// !IGNORE_DATA_FLOW_IN_ASSERT
// SKIP_TXT
// WITH_RUNTIME
fun test1(s: String?) {
assert(s!!.isEmpty())
s?.length
s<!NI;UNNECESSARY_SAFE_CALL!>?.<!>length
}
fun test2(s: String?) {
assert(s!!.isEmpty())
s!!.length
s<!NI;UNNECESSARY_NOT_NULL_ASSERTION!>!!<!>.length
}
fun test3(s: String?) {
assert(s!!.isEmpty())
s<!UNSAFE_CALL!>.<!>length
<!NI;DEBUG_INFO_SMARTCAST!>s<!><!OI;UNSAFE_CALL!>.<!>length
}
fun test4() {
val s: String? = null;
assert(s!!.isEmpty())
s?.length
s<!NI;UNNECESSARY_SAFE_CALL!>?.<!>length
}
fun test5() {
val s: String? = null;
assert(s!!.isEmpty())
s!!.length
s<!NI;UNNECESSARY_NOT_NULL_ASSERTION!>!!<!>.length
}
fun test6() {
val s: String? = null;
assert(s!!.isEmpty())
s<!UNSAFE_CALL!>.<!>length
<!NI;DEBUG_INFO_SMARTCAST!>s<!><!OI;UNSAFE_CALL!>.<!>length
}