Add test for outdated smart cast with elvis issue
#KT-5335 Obsolete
This commit is contained in:
+1
-1
@@ -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
|
||||
Reference in New Issue
Block a user