Do not highlight replacement of equals involving floating-point types
Two tests with smart casts do not work yet Part of KT-25933
This commit is contained in:
committed by
Mikhail Glukhikh
parent
8c6337f3f6
commit
1aa9d5673b
+4
@@ -0,0 +1,4 @@
|
||||
// FIX: Replace total order equality with IEEE 754 equality
|
||||
|
||||
fun test(a: Any, b: Any) =
|
||||
a is Double && b is Double && a.<caret>equals(b)
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
// FIX: Replace total order equality with IEEE 754 equality
|
||||
|
||||
fun test(a: Any, b: Any) =
|
||||
a is Double && b is Double && a == b
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
// FIX: Replace total order equality with IEEE 754 equality
|
||||
|
||||
fun test(a: Any, b: Any) =
|
||||
a is Float && b is Float && a.<caret>equals(b)
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
// FIX: Replace total order equality with IEEE 754 equality
|
||||
|
||||
fun test(a: Any, b: Any) =
|
||||
a is Float && b is Float && a == b
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
// FIX: Replace total order equality with IEEE 754 equality
|
||||
|
||||
fun checkPi(x: Double) = x.<caret>equals(3.14)
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
// FIX: Replace total order equality with IEEE 754 equality
|
||||
|
||||
fun checkPi(x: Double) = x == 3.14
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
// FIX: Replace total order equality with IEEE 754 equality
|
||||
|
||||
fun checkPi(x: Double) = 3.14.<caret>equals(x)
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
// FIX: Replace total order equality with IEEE 754 equality
|
||||
|
||||
fun checkPi(x: Double) = 3.14 == x
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
// FIX: Replace total order equality with IEEE 754 equality
|
||||
|
||||
fun test(a: Double, b: Double) = a.<caret>equals(b)
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
// FIX: Replace total order equality with IEEE 754 equality
|
||||
|
||||
fun test(a: Double, b: Double) = a == b
|
||||
Reference in New Issue
Block a user