Commit 7653ce2
committed
[CSRanking] Specify whether specialization check allows missing conformances or not
We have two places where `CompareDeclSpecializationRequest` is used:
- A performance optimization that compares two generic overloads;
- Solution ranking that checks all of the selected overloads against
another solution.
The former can allow missing conformances and shouldn't prevent
the solver from checking overloads that differ on `Sendable`
(because there is no information about what is passed as arguments)
but the latter, since it has a solution, should prefer Sendable
overloads over non-Sendable ones if possible
(i.e. `init<T: Sendable>(_: T)` is a subtype of `init<T>(_: T)`).
(cherry picked from commit e24d18c)1 parent 6fe9099 commit 7653ce2
File tree
4 files changed
+27
-18
lines changed- include/swift/AST
- lib/Sema
- test/Concurrency
4 files changed
+27
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2575 | 2575 | | |
2576 | 2576 | | |
2577 | 2577 | | |
2578 | | - | |
| 2578 | + | |
| 2579 | + | |
2579 | 2580 | | |
2580 | 2581 | | |
2581 | 2582 | | |
| |||
2584 | 2585 | | |
2585 | 2586 | | |
2586 | 2587 | | |
2587 | | - | |
2588 | | - | |
2589 | | - | |
| 2588 | + | |
| 2589 | + | |
| 2590 | + | |
2590 | 2591 | | |
2591 | 2592 | | |
2592 | 2593 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
51 | | - | |
| 50 | + | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
417 | 417 | | |
418 | 418 | | |
419 | 419 | | |
420 | | - | |
| 420 | + | |
| 421 | + | |
421 | 422 | | |
422 | 423 | | |
423 | | - | |
| 424 | + | |
| 425 | + | |
424 | 426 | | |
425 | 427 | | |
426 | 428 | | |
427 | 429 | | |
428 | 430 | | |
429 | | - | |
| 431 | + | |
430 | 432 | | |
431 | 433 | | |
432 | 434 | | |
| |||
759 | 761 | | |
760 | 762 | | |
761 | 763 | | |
762 | | - | |
763 | | - | |
764 | | - | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
765 | 774 | | |
766 | 775 | | |
767 | 776 | | |
| |||
1121 | 1130 | | |
1122 | 1131 | | |
1123 | 1132 | | |
1124 | | - | |
| 1133 | + | |
| 1134 | + | |
1125 | 1135 | | |
1126 | 1136 | | |
1127 | 1137 | | |
1128 | 1138 | | |
1129 | | - | |
| 1139 | + | |
| 1140 | + | |
1130 | 1141 | | |
1131 | 1142 | | |
1132 | 1143 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | 10 | | |
12 | | - | |
13 | 11 | | |
14 | 12 | | |
15 | 13 | | |
| |||
23 | 21 | | |
24 | 22 | | |
25 | 23 | | |
26 | | - | |
27 | | - | |
| 24 | + | |
28 | 25 | | |
29 | 26 | | |
30 | 27 | | |
0 commit comments