Commit 79e8a6c
committed
[Sema] Avoid marking TypeRepr invalid with
Pattern resolution currently invokes type resolution with this flag
since it's trying to see if it can treat a given expression as a
TypeRepr for e.g an enum pattern. Make sure we don't `setInvalid` on
such TypeRepr nodes since that will avoid diagnosing in cases where
the node also then gets treated as a TypeRepr for an ExprPattern,
where we actually want the diagnostic emitted.SilenceErrors
1 parent 7296c82 commit 79e8a6c
File tree
3 files changed
+20
-4
lines changed- lib/Sema
- test/Constraints
- validation-test/compiler_crashers_2_fixed
3 files changed
+20
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2637 | 2637 | | |
2638 | 2638 | | |
2639 | 2639 | | |
2640 | | - | |
2641 | | - | |
| 2640 | + | |
| 2641 | + | |
| 2642 | + | |
2642 | 2643 | | |
2643 | | - | |
| 2644 | + | |
| 2645 | + | |
2644 | 2646 | | |
2645 | 2647 | | |
2646 | 2648 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
820 | 820 | | |
821 | 821 | | |
822 | 822 | | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
0 commit comments