Commit 1f88720
committed
[Diagnostics] Don't attempt to synthesize arguments when destructuring a single tuple argument results in an overrun
If arguments are represented by a single tuple it's possible
that the issue is not about missing parameters but instead
about tuple destructuring. Fix `fixMissingArguments` to check for
overruns after destructuring and stop if that produces more
arguments then parameters because such situations are better
diagnosed as a general conversion failure rather than a missing
argument(s) problem.
Resolves: rdar://1594087151 parent 3bbd7da commit 1f88720
File tree
2 files changed
+7
-1
lines changed- lib/Sema
- validation-test/compiler_crashers_fixed
2 files changed
+7
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2747 | 2747 | | |
2748 | 2748 | | |
2749 | 2749 | | |
| 2750 | + | |
| 2751 | + | |
| 2752 | + | |
| 2753 | + | |
| 2754 | + | |
| 2755 | + | |
2750 | 2756 | | |
2751 | 2757 | | |
2752 | 2758 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
0 commit comments