Commit eb4ebd3
Adjust unrelated_type_equality_checks on mixins and extension types
The lint unrelated_type_equality_checks previously considered all mixins
and extension types to be (possibly) related (even any mixin and any
extension type, not just any pair of mixins and any pair of extension
types). This would not fit the expectations for this lint, it should
certainly consider a mixin as unrelated to an extension type that isn't
a subtype of the mixin, and similarly for any pair of mixins that aren't
subtype related, and any pair of extension types that aren't subtype
related.
This PR changes the lint (that is, the underlying extension method
`interfaceTypesAreUnrelated`) such that these pairs are considered
unrelated.
Bug: #59423
Change-Id: I370e98eb17c60ab50f1118b6e841d7eee7291e54
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/440640
Reviewed-by: Konstantin Shcheglov <[email protected]>
Commit-Queue: Samuel Rawlins <[email protected]>
Reviewed-by: Samuel Rawlins <[email protected]>1 parent 4a009c3 commit eb4ebd3
File tree
3 files changed
+75
-10
lines changed- pkg
- analyzer/lib/src/fine
- linter
- lib/src/util
- test/rules
3 files changed
+75
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
42 | 44 | | |
43 | 45 | | |
44 | 46 | | |
| |||
101 | 103 | | |
102 | 104 | | |
103 | 105 | | |
104 | | - | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
105 | 109 | | |
106 | 110 | | |
107 | 111 | | |
| |||
164 | 168 | | |
165 | 169 | | |
166 | 170 | | |
167 | | - | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
168 | 174 | | |
169 | 175 | | |
170 | 176 | | |
| |||
233 | 239 | | |
234 | 240 | | |
235 | 241 | | |
236 | | - | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
237 | 245 | | |
238 | 246 | | |
239 | 247 | | |
| |||
1136 | 1144 | | |
1137 | 1145 | | |
1138 | 1146 | | |
1139 | | - | |
| 1147 | + | |
| 1148 | + | |
| 1149 | + | |
1140 | 1150 | | |
1141 | 1151 | | |
1142 | 1152 | | |
| |||
1391 | 1401 | | |
1392 | 1402 | | |
1393 | 1403 | | |
1394 | | - | |
| 1404 | + | |
| 1405 | + | |
| 1406 | + | |
1395 | 1407 | | |
1396 | 1408 | | |
1397 | 1409 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
| 157 | + | |
| 158 | + | |
157 | 159 | | |
158 | 160 | | |
159 | 161 | | |
| |||
282 | 284 | | |
283 | 285 | | |
284 | 286 | | |
285 | | - | |
| 287 | + | |
| 288 | + | |
286 | 289 | | |
287 | | - | |
288 | | - | |
289 | | - | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
290 | 295 | | |
291 | 296 | | |
292 | 297 | | |
| |||
Lines changed: 48 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
40 | 65 | | |
41 | 66 | | |
42 | 67 | | |
| |||
119 | 144 | | |
120 | 145 | | |
121 | 146 | | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
122 | 170 | | |
123 | 171 | | |
124 | 172 | | |
| |||
0 commit comments