Files
kotlin-fork/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/equalsDoubleSmartCastFromGeneric.kt
T
Mikhail Glukhikh 6be65e7d1a Replace equals with == involving FP types: handle possible smart casts
This fixes two relevant tests with smart casts
#KT-25933 Fixed
2018-10-10 15:02:47 +03:00

4 lines
140 B
Kotlin
Vendored

// FIX: Replace total order equality with IEEE 754 equality
fun <T> test(a: T, b: T) =
a is Double && b is Double && a.<caret>equals(b)