ProperNumberComparisons is disabled by default (until LDC decision)

This commit is contained in:
Dmitry Petrov
2018-02-09 16:21:46 +03:00
parent af79bbd247
commit 839ebba157
17 changed files with 305 additions and 65 deletions
@@ -0,0 +1,11 @@
// !LANGUAGE: +ProperIeee754Comparisons
fun less(x: Comparable<Float>, y: Float) = x is Float && x < y
fun less(x: Comparable<Double>, y: Double) = x is Double && x < y
fun box(): String {
if (less(-0.0F, 0.0F)) return "Fail F"
if (less(-0.0, 0.0)) return "Fail D"
return "OK"
}