Handle nullable case in '==' with smart cast using safe call

This commit is contained in:
Dmitry Petrov
2018-02-07 08:44:29 +03:00
parent 00325ae539
commit 5678b3d52a
5 changed files with 105 additions and 8 deletions
@@ -1,3 +1,4 @@
fun testDD(x: Double?, y: Double?) = x == y
fun testDF(x: Double?, y: Any?) = y is Float? && x == y
fun testDI(x: Double?, y: Any?) = y is Int? && x == y
fun testDI(x: Double?, y: Any?) = y is Int? && x == y
fun testDI2(x: Any?, y: Any?) = x is Int? && y is Double && x == y