Commit edda7a9
committed
Ignore async/sync mismatch on main
The main function is different from other function resolutions. It isn't
being called from a synchronous or asynchronous context, but defines
whether the program starts in a synchronous or async context. As a
result, we should not prefer one over the other, so the scoring
mechanism shouldn't involve the async/sync score when resolving the main
function.
This patch adds a constraint solver flag to ignore async/sync context
mismatches so that we do not favor one over the other, but otherwise use
the normal resolution behavior.1 parent 1858878 commit edda7a9
File tree
3 files changed
+7
-2
lines changed- include/swift/Sema
- lib/Sema
3 files changed
+7
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1515 | 1515 | | |
1516 | 1516 | | |
1517 | 1517 | | |
| 1518 | + | |
| 1519 | + | |
| 1520 | + | |
1518 | 1521 | | |
1519 | 1522 | | |
1520 | 1523 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3304 | 3304 | | |
3305 | 3305 | | |
3306 | 3306 | | |
3307 | | - | |
| 3307 | + | |
| 3308 | + | |
3308 | 3309 | | |
3309 | 3310 | | |
3310 | 3311 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2172 | 2172 | | |
2173 | 2173 | | |
2174 | 2174 | | |
2175 | | - | |
| 2175 | + | |
| 2176 | + | |
2176 | 2177 | | |
2177 | 2178 | | |
2178 | 2179 | | |
| |||
0 commit comments