[FIR] Update/add extended checker tests

This commit is contained in:
vldf
2020-08-27 10:46:01 +03:00
committed by Mikhail Glukhikh
parent acbb67f851
commit bf363e8f1a
43 changed files with 351 additions and 72 deletions
@@ -1,5 +1,5 @@
// WITH_RUNTIME
// IS_APPLICABLE: false
fun foo(s: String?) {
val t: String = s.toString()
val <!UNUSED_VARIABLE!>t<!>: String = s.toString()
}
@@ -3,5 +3,5 @@
data class Foo(val name: String)
fun nullable2(foo: Foo?) {
val s: String = foo?.name.toString()
val <!UNUSED_VARIABLE!>s<!>: String = foo?.name.toString()
}
@@ -2,5 +2,5 @@
data class Foo(val name: String)
fun test(foo: Foo?) {
val s: String? = foo?.name?.<!REDUNDANT_CALL_OF_CONVERSION_METHOD!>toString()<!>
val <!UNUSED_VARIABLE!>s<!>: String? = foo?.name?.<!REDUNDANT_CALL_OF_CONVERSION_METHOD!>toString()<!>
}
@@ -1,4 +1,4 @@
// WITH_RUNTIME
fun test(i: UByte) {
val foo = i.<!REDUNDANT_CALL_OF_CONVERSION_METHOD!>toUByte()<!>
val <!UNUSED_VARIABLE!>foo<!> = i.<!REDUNDANT_CALL_OF_CONVERSION_METHOD!>toUByte()<!>
}
@@ -1,4 +1,4 @@
// WITH_RUNTIME
fun test(i: UInt) {
val foo = i.<!REDUNDANT_CALL_OF_CONVERSION_METHOD!>toUInt()<!>
val <!UNUSED_VARIABLE!>foo<!> = i.<!REDUNDANT_CALL_OF_CONVERSION_METHOD!>toUInt()<!>
}
@@ -1,4 +1,4 @@
// WITH_RUNTIME
fun test(i: ULong) {
val foo = i.<!REDUNDANT_CALL_OF_CONVERSION_METHOD!>toULong()<!>
val <!UNUSED_VARIABLE!>foo<!> = i.<!REDUNDANT_CALL_OF_CONVERSION_METHOD!>toULong()<!>
}
@@ -1,4 +1,4 @@
// WITH_RUNTIME
fun test(i: UShort) {
val foo = i.<!REDUNDANT_CALL_OF_CONVERSION_METHOD!>toUShort()<!>
val <!UNUSED_VARIABLE!>foo<!> = i.<!REDUNDANT_CALL_OF_CONVERSION_METHOD!>toUShort()<!>
}