df6d4f358a
Labels are meaningful only if they can be referenced by 'break', 'continue', or 'return' expressions.
23 lines
866 B
Kotlin
Vendored
23 lines
866 B
Kotlin
Vendored
fun testEquals(x: Int) {
|
|
if (<!SENSELESS_COMPARISON!>x == null<!>) {}
|
|
if (<!SENSELESS_COMPARISON!>x == (null)<!>) {}
|
|
if (<!SENSELESS_COMPARISON!>x == <!REDUNDANT_LABEL_WARNING!>foo@<!> null<!>) {}
|
|
}
|
|
|
|
fun testEqualsFlipped(x: Int) {
|
|
if (<!SENSELESS_COMPARISON!>null == x<!>) {}
|
|
if (<!SENSELESS_COMPARISON!>(null) == x<!>) {}
|
|
if (<!SENSELESS_COMPARISON!><!REDUNDANT_LABEL_WARNING!>foo@<!> null == x<!>) {}
|
|
}
|
|
|
|
fun testNotEquals(x: Int) {
|
|
if (<!SENSELESS_COMPARISON!>x != null<!>) {}
|
|
if (<!SENSELESS_COMPARISON!>x != (null)<!>) {}
|
|
if (<!SENSELESS_COMPARISON!>x != <!REDUNDANT_LABEL_WARNING!>foo@<!> null<!>) {}
|
|
}
|
|
|
|
fun testNotEqualsFlipped(x: Int) {
|
|
if (<!SENSELESS_COMPARISON!>null != x<!>) {}
|
|
if (<!SENSELESS_COMPARISON!>(null) != x<!>) {}
|
|
if (<!SENSELESS_COMPARISON!><!REDUNDANT_LABEL_WARNING!>foo@<!> null != x<!>) {}
|
|
} |