Effects: add diagnostic tests on functions from stdlib
========== Introduction of EffectSystem: 18/18
This commit is contained in:
+20
@@ -0,0 +1,20 @@
|
||||
// !LANGUAGE: +ReturnsEffect
|
||||
// !DIAGNOSTICS: -INVISIBLE_REFERENCE -INVISIBLE_MEMBER
|
||||
|
||||
fun testIsNullOrEmpty(x: String?) {
|
||||
if (x.isNullOrEmpty()) {
|
||||
x<!UNSAFE_CALL!>.<!>length
|
||||
}
|
||||
else {
|
||||
<!DEBUG_INFO_SMARTCAST!>x<!>.length
|
||||
}
|
||||
}
|
||||
|
||||
fun testIsNotNullOrEmpty(x: String?) {
|
||||
if (!x.isNullOrEmpty()) {
|
||||
<!DEBUG_INFO_SMARTCAST!>x<!>.length
|
||||
}
|
||||
|
||||
x<!UNSAFE_CALL!>.<!>length
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user