Commit 0e6260d
committed
[Diagnostics] Special case assignment between nominal types with optional promotion
Skip fixing situation where source and destination of assignment are both
nominal types with different optionality until restriction is attempted.
Otherwise fix could be too greedy and diagnose valid code if all of the
types are known in advance.
Resolves: SR-13951
Resolves: rdar://problem/721667911 parent 23b8dba commit 0e6260d
2 files changed
+41
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3722 | 3722 | | |
3723 | 3723 | | |
3724 | 3724 | | |
3725 | | - | |
3726 | | - | |
| 3725 | + | |
| 3726 | + | |
3727 | 3727 | | |
3728 | 3728 | | |
3729 | | - | |
| 3729 | + | |
3730 | 3730 | | |
3731 | 3731 | | |
3732 | 3732 | | |
| 3733 | + | |
3733 | 3734 | | |
3734 | 3735 | | |
3735 | 3736 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
0 commit comments