Commit 6ef2dbc
Introduce
Previously, `ExtensionMemberResolver` used `ResolutionResult` to
return its results. This created unnecessary complexity, because
`ResolutionResult` needs to be able to represent a lot of resolution
results that aren't possible when resolving extensions (references to
`Function.call`, references to record fields, and various complex
error reporting scenarios). Conversely, `ExtensionResolutionResult`
needs to be able to represent some scenarios that arent relevant when
doing non-extension resolution (extension lookup resulting in no
result or an ambiguous result).
Splitting into two classes makes both classes simpler.
In a few cases, code needs to be able to handle either a
`ResolutionResult` or an `ExtensionResolutionResult`; for these cases,
I've added a common base class `SimpleResolutionResult`.
This change paves the way for some clean-up work I'm doing on
`TypePropertyResolver` (which uses `ResolutionResult`).
Change-Id: I205251e43d7263cd2df7c729d1550dbb55980f62
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/393442
Reviewed-by: Konstantin Shcheglov <[email protected]>
Commit-Queue: Paul Berry <[email protected]>ExtensionResolutionResult for use by ExtensionMemberResolver.1 parent 86ec883 commit 6ef2dbc
File tree
5 files changed
+62
-59
lines changed- pkg/analyzer/lib/src/dart/resolver
5 files changed
+62
-59
lines changedLines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | | - | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
30 | | - | |
| 29 | + | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
Lines changed: 40 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
| 81 | + | |
| 82 | + | |
82 | 83 | | |
83 | 84 | | |
84 | | - | |
85 | | - | |
| 85 | + | |
| 86 | + | |
86 | 87 | | |
87 | 88 | | |
88 | 89 | | |
| |||
92 | 93 | | |
93 | 94 | | |
94 | 95 | | |
95 | | - | |
| 96 | + | |
96 | 97 | | |
97 | 98 | | |
98 | 99 | | |
| |||
140 | 141 | | |
141 | 142 | | |
142 | 143 | | |
143 | | - | |
| 144 | + | |
144 | 145 | | |
145 | 146 | | |
146 | 147 | | |
147 | 148 | | |
148 | 149 | | |
149 | 150 | | |
150 | | - | |
| 151 | + | |
| 152 | + | |
151 | 153 | | |
152 | 154 | | |
153 | 155 | | |
| |||
161 | 163 | | |
162 | 164 | | |
163 | 165 | | |
164 | | - | |
| 166 | + | |
165 | 167 | | |
166 | 168 | | |
167 | 169 | | |
| |||
174 | 176 | | |
175 | 177 | | |
176 | 178 | | |
177 | | - | |
| 179 | + | |
| 180 | + | |
178 | 181 | | |
179 | 182 | | |
180 | 183 | | |
| |||
450 | 453 | | |
451 | 454 | | |
452 | 455 | | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
Lines changed: 7 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
53 | 55 | | |
54 | 56 | | |
55 | 57 | | |
| |||
59 | 61 | | |
60 | 62 | | |
61 | 63 | | |
62 | | - | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
63 | 67 | | |
64 | 68 | | |
65 | 69 | | |
| |||
889 | 893 | | |
890 | 894 | | |
891 | 895 | | |
892 | | - | |
| 896 | + | |
893 | 897 | | |
894 | 898 | | |
895 | 899 | | |
| |||
Lines changed: 10 additions & 43 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
| 9 | + | |
24 | 10 | | |
25 | 11 | | |
26 | 12 | | |
| |||
34 | 20 | | |
35 | 21 | | |
36 | 22 | | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | 23 | | |
41 | 24 | | |
42 | 25 | | |
| |||
56 | 39 | | |
57 | 40 | | |
58 | 41 | | |
59 | | - | |
| 42 | + | |
60 | 43 | | |
61 | 44 | | |
62 | | - | |
| 45 | + | |
63 | 46 | | |
64 | 47 | | |
65 | 48 | | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
| 49 | + | |
81 | 50 | | |
82 | 51 | | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
87 | 55 | | |
88 | | - | |
89 | | - | |
| 56 | + | |
| 57 | + | |
90 | 58 | | |
91 | | - | |
92 | | - | |
| 59 | + | |
93 | 60 | | |
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
237 | | - | |
238 | | - | |
| 237 | + | |
| 238 | + | |
239 | 239 | | |
240 | 240 | | |
241 | 241 | | |
| |||
0 commit comments