Commit f51b4a3
committed
Improve Diagnostics for Over-Constrained Protocol Types
Upgrade the diagnostic from one that mentions the restriction to one
that
1) Mentions primary associated types at all
2) Removes the constraints
3) Points at the declaration of the protocol type so the user can fix it1 parent b9ef3e8 commit f51b4a3
File tree
3 files changed
+16
-4
lines changed- include/swift/AST
- lib/Sema
- test/Generics
3 files changed
+16
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3762 | 3762 | | |
3763 | 3763 | | |
3764 | 3764 | | |
3765 | | - | |
| 3765 | + | |
| 3766 | + | |
3766 | 3767 | | |
3767 | 3768 | | |
3768 | 3769 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
621 | 621 | | |
622 | 622 | | |
623 | 623 | | |
624 | | - | |
625 | | - | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
626 | 630 | | |
627 | 631 | | |
628 | 632 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
258 | 258 | | |
259 | 259 | | |
260 | 260 | | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
0 commit comments