[FIR] Update smartcast tests

This commit is contained in:
Nikolay Lunyak
2022-05-30 16:18:26 +03:00
committed by teamcity
parent 611691ec70
commit d7e8dc65f5
3 changed files with 119 additions and 0 deletions
@@ -50,3 +50,17 @@ FILE: smartcastToNothing.kt
}
) }
}
public final fun test_1(a: R|kotlin/String?|): R|kotlin/Unit| {
when () {
(R|<local>/a| is R|kotlin/Nothing?|) -> {
lval b: R|kotlin/Int?| = R|<local>/a|?.{ $subj$.R|kotlin/String.length| }
}
}
when () {
(R|<local>/a| is R|kotlin/Nothing|) -> {
lval b: R|kotlin/Int| = R|<local>/a|.R|kotlin/String.length|
}
}
}