[LL API] Fix smart-cast collection for special 'FirElement's

'DFANode' is not created for certain elements, such as types or
references. Before the change, only the target element itself was
queried for DFA, making the 'ContextCollector' return an empty map of
smart casts.

^KTIJ-26973 Fixed
This commit is contained in:
Yan Zhulanow
2023-09-09 02:04:48 +09:00
committed by Space Team
parent 6c1711c52a
commit 4690a430f4
9 changed files with 251 additions and 15 deletions
@@ -0,0 +1,13 @@
fun test(a: Any) {
if (a !is Foo) {
return
}
<expr>check</expr>(a.process())
}
fun check(condition: Boolean) {}
interface Foo {
fun process(): Boolean
}