FIR DFA: add a union node for property delegates

The delegate is resolved in context-dependent mode and thus can be an
incomplete call; if there is no `provideDelegate` method to complete it,
the result is effectively `val x$delegate = y.id()` where `id` is
`fun <T> id(x: T) = x`, except we don't get a real node for `id` so the
DFA edges from lambdas in `y` go who knows where.
This commit is contained in:
pyos
2022-11-22 11:08:05 +01:00
committed by teamcity
parent a9be27e330
commit 8a68eac5f1
9 changed files with 64 additions and 19 deletions
@@ -225,7 +225,8 @@ digraph delegateWithAnonymousObject_kt {
74 [label="Function call: this@R|/IssuesListUserProfile|.R|/delegate|<R|IssuesListUserProfile|, R|IssuesListUserProfile|, R|IssueListView|>(...)" style="filled" fillcolor=yellow];
75 [label="Access variable this@R|/IssuesListUserProfile|"];
76 [label="Function call: this@R|/IssuesListUserProfile|.R|/delegate|<R|IssuesListUserProfile|, R|IssuesListUserProfile|, R|IssueListView|>(...).<Unresolved name: provideDelegate>#(...)" style="filled" fillcolor=yellow];
77 [label="Exit property" style="filled" fillcolor=red];
77 [label="Exit property delegate" style="filled" fillcolor=yellow];
78 [label="Exit property" style="filled" fillcolor=red];
}
71 -> {72};
72 -> {73};
@@ -234,17 +235,18 @@ digraph delegateWithAnonymousObject_kt {
74 -> {75};
75 -> {76};
76 -> {77};
77 -> {80} [color=green];
77 -> {78};
78 -> {81} [color=green];
subgraph cluster_22 {
color=red
78 [label="Enter class IssuesListUserProfile" style="filled" fillcolor=red];
79 [label="Part of class initialization"];
80 [label="Exit class IssuesListUserProfile" style="filled" fillcolor=red];
79 [label="Enter class IssuesListUserProfile" style="filled" fillcolor=red];
80 [label="Part of class initialization"];
81 [label="Exit class IssuesListUserProfile" style="filled" fillcolor=red];
}
78 -> {79} [color=green];
79 -> {80} [style=dotted];
79 -> {71} [color=green];
79 -> {71} [style=dashed];
79 -> {80} [color=green];
80 -> {81} [style=dotted];
80 -> {71} [color=green];
80 -> {71} [style=dashed];
}