Commit 6c36d66
committed
Fix issue 19465 - improve 'cannot uniquely infer foreach argument types' diagnostic
Add supplemental error messages explaining why no opApply overload
matched a foreach statement's parameters (parameter count mismatch,
qualifier/mutability mismatch, or explicit type mismatch), instead of
the previous generic error with no further detail.
The added diagnostics are only printed when no more specific error
(e.g. ambiguous overload match) was already reported for the same
failure, to avoid duplicating existing diagnostics.1 parent ff23268 commit 6c36d66
1 file changed
Lines changed: 6 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1564 | 1564 | | |
1565 | 1565 | | |
1566 | 1566 | | |
1567 | | - | |
1568 | | - | |
1569 | | - | |
1570 | | - | |
1571 | | - | |
1572 | | - | |
| 1567 | + | |
| 1568 | + | |
| 1569 | + | |
1573 | 1570 | | |
1574 | | - | |
1575 | | - | |
1576 | | - | |
| 1571 | + | |
| 1572 | + | |
| 1573 | + | |
1577 | 1574 | | |
1578 | 1575 | | |
1579 | 1576 | | |
| |||
0 commit comments