FIR. Refactor smart-cast representation in FIR tree

Make smart-casts non-transparent expression without delegation
to underlying FirQualifiedAccessExpression, as children delegation in
fir tree has unclear semantics
Remove two different kinds of tree nodes for smart-casts
This commit is contained in:
Simon Ogorodnik
2022-08-02 00:49:24 +02:00
committed by teamcity
parent bc9db58b3c
commit 513af2dfbc
154 changed files with 9573 additions and 9320 deletions
@@ -0,0 +1,9 @@
interface Foo {
fun function()
}
fun foo(parameter: Any) {
if (parameter is Foo) {
<caret>parameter.function()
}
}
@@ -0,0 +1,2 @@
Resolved to:
0: parameter: kotlin.Any
@@ -0,0 +1,9 @@
interface WithInvoke {
operator fun invoke() {}
}
fun foo(parameter: Any) {
if (parameter is WithInvoke) {
<caret>parameter()
}
}
@@ -0,0 +1,2 @@
Resolved to:
0: parameter: kotlin.Any