[FIR] Properly support smartcasts on stable when subjects in when conditions

^KT-49860 Fixed
This commit is contained in:
Dmitriy Novozhilov
2021-11-24 17:14:21 +03:00
committed by teamcityserver
parent 20425fb458
commit 330574cab6
41 changed files with 1225 additions and 791 deletions
+2 -1
View File
@@ -15,7 +15,7 @@ fun testWithSubject(x: Any?): String {
EQEQ(arg0 = tmp0_subject, arg1 = A) -> "A"
tmp0_subject is String -> "String"
tmp0_subject !is Number -> "!Number"
setOf<Nothing>().contains<Any?>(element = tmp0_subject) -> "nothingness?"
setOf<Nothing>().contains<Number>(element = tmp0_subject /*as Number */) -> "nothingness?"
else -> "something"
}
}
@@ -61,3 +61,4 @@ fun testComma(x: Int): String {
}
}
}