FIR checker: warn useless as and is
This commit is contained in:
committed by
TeamCityServer
parent
19d939c36e
commit
e2dc21da90
@@ -1,4 +0,0 @@
|
||||
@Suppress("REDUNDANT_NULLABLE")
|
||||
class C {
|
||||
fun foo(): String?? = null as Nothing??
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
@Suppress("REDUNDANT_NULLABLE")
|
||||
class C {
|
||||
fun foo(): String?? = null <!USELESS_CAST!>as Nothing??<!>
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
class C {
|
||||
@Suppress("REDUNDANT_NULLABLE")
|
||||
companion object {
|
||||
val foo: String?? = null as Nothing??
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
class C {
|
||||
@Suppress("REDUNDANT_NULLABLE")
|
||||
companion object {
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
fun foo(): Any? {
|
||||
@Suppress("REDUNDANT_NULLABLE")
|
||||
return null as Nothing??
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
fun foo(): Any? {
|
||||
@Suppress("REDUNDANT_NULLABLE")
|
||||
return null <!USELESS_CAST!>as Nothing??<!>
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
class C {
|
||||
@Suppress("REDUNDANT_NULLABLE")
|
||||
fun foo(): String?? = null as Nothing??
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
class C {
|
||||
@Suppress("REDUNDANT_NULLABLE")
|
||||
fun foo(): String?? = null <!USELESS_CAST!>as Nothing??<!>
|
||||
|
||||
-7
@@ -1,7 +0,0 @@
|
||||
class C {
|
||||
fun foo(): Any? {
|
||||
@Suppress("REDUNDANT_NULLABLE")
|
||||
val v: String?? = null as Nothing??
|
||||
return v
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
class C {
|
||||
fun foo(): Any? {
|
||||
@Suppress("REDUNDANT_NULLABLE")
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
@Suppress("REDUNDANT_NULLABLE")
|
||||
object C {
|
||||
fun foo(): String?? = null as Nothing??
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
@Suppress("REDUNDANT_NULLABLE")
|
||||
object C {
|
||||
fun foo(): String?? = null <!USELESS_CAST!>as Nothing??<!>
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
class C {
|
||||
fun foo(@Suppress("REDUNDANT_NULLABLE") p: String?? = null as Nothing??) = p
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
class C {
|
||||
fun foo(@Suppress("REDUNDANT_NULLABLE") p: String?? = null <!USELESS_CAST!>as Nothing??<!>) = p
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
class C {
|
||||
@Suppress("REDUNDANT_NULLABLE")
|
||||
val foo: String?? = null as Nothing?
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
class C {
|
||||
@Suppress("REDUNDANT_NULLABLE")
|
||||
val foo: String?? = null <!USELESS_CAST!>as Nothing?<!>
|
||||
|
||||
-5
@@ -1,5 +0,0 @@
|
||||
class C {
|
||||
val foo: String?
|
||||
@Suppress("REDUNDANT_NULLABLE")
|
||||
get(): String?? = null as Nothing??
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
class C {
|
||||
val foo: String?
|
||||
@Suppress("REDUNDANT_NULLABLE")
|
||||
|
||||
Reference in New Issue
Block a user