Add test for outdated smart cast with elvis issue

#KT-5335 Obsolete
This commit is contained in:
Alexander Udalov
2014-10-16 16:35:11 +04:00
parent 6387076efe
commit 6698e0ecc9
6 changed files with 24 additions and 5 deletions
@@ -8,4 +8,4 @@ fun test(a: C?, nn: () -> Nothing?) {
a ?: return
<!DEBUG_INFO_SMARTCAST!>a<!>.foo()
}
}
@@ -0,0 +1,10 @@
// !DIAGNOSTICS: -UNUSED_VARIABLE
// KT-5335
fun foo(p1: String?, p2: String?) {
if (p2 != null) {
val v = p1 ?: <!DEBUG_INFO_SMARTCAST!>p2<!>
val size = v.length
}
}
@@ -0,0 +1,3 @@
package
internal fun foo(/*0*/ p1: kotlin.String?, /*1*/ p2: kotlin.String?): kotlin.Unit