[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
+3 -2
View File
@@ -46,10 +46,11 @@ FILE fqName:<root> fileName:/when.kt
then: CONST String type=kotlin.String value="!Number"
BRANCH
if: CALL 'public final fun contains <T> (element: T of kotlin.collections.CollectionsKt.contains): kotlin.Boolean [operator] declared in kotlin.collections.CollectionsKt' type=kotlin.Boolean origin=IN
<T>: kotlin.Any?
<T>: kotlin.Number
$receiver: CALL 'public final fun setOf <T> (): kotlin.collections.Set<T of kotlin.collections.SetsKt.setOf> [inline] declared in kotlin.collections.SetsKt' type=kotlin.collections.Set<kotlin.Nothing> origin=null
<T>: kotlin.Nothing
element: GET_VAR 'val tmp_0: kotlin.Any? [val] declared in <root>.testWithSubject' type=kotlin.Any? origin=null
element: TYPE_OP type=kotlin.Number origin=IMPLICIT_CAST typeOperand=kotlin.Number
GET_VAR 'val tmp_0: kotlin.Any? [val] declared in <root>.testWithSubject' type=kotlin.Any? origin=null
then: CONST String type=kotlin.String value="nothingness?"
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true