Fix IR generation for '!is' pattern

This commit is contained in:
Dmitry Petrov
2018-08-29 14:13:28 +03:00
parent 623adbfe4a
commit 4cf98fd3ce
5 changed files with 43 additions and 14 deletions
+2
View File
@@ -7,6 +7,7 @@ fun testWithSubject(x: Any?) =
null -> "null"
A -> "A"
is String -> "String"
!is Number -> "!Number"
in setOf<Nothing>() -> "nothingness?"
else -> "something"
}
@@ -16,6 +17,7 @@ fun test(x: Any?) =
x == null -> "null"
x == A -> "A"
x is String -> "String"
x !is Number -> "!Number"
x in setOf<Nothing>() -> "nothingness?"
else -> "something"
}