Commit 3360a44
authored
Disallow non-lhs all-underscore variable names (#57626)
Addresses part of #57547. Currently, we only show the "all-underscore
variable name not allowed" error when the offending symbol is in value
position according to `compile`, but an earlier pass would keep them as
raw symbols regardless. This led to raw symbols making their way out of
lowering in an edge case.
This change: Reject all-underscore variables unless they're being
written to. Also, improve an error message slighly.1 parent d934b03 commit 3360a44
3 files changed
+19
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4659 | 4659 | | |
4660 | 4660 | | |
4661 | 4661 | | |
4662 | | - | |
4663 | | - | |
4664 | | - | |
| 4662 | + | |
| 4663 | + | |
| 4664 | + | |
4665 | 4665 | | |
4666 | 4666 | | |
4667 | 4667 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
| 87 | + | |
| 88 | + | |
88 | 89 | | |
89 | 90 | | |
90 | 91 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2831 | 2831 | | |
2832 | 2832 | | |
2833 | 2833 | | |
| 2834 | + | |
| 2835 | + | |
| 2836 | + | |
| 2837 | + | |
| 2838 | + | |
| 2839 | + | |
| 2840 | + | |
| 2841 | + | |
| 2842 | + | |
| 2843 | + | |
| 2844 | + | |
| 2845 | + | |
| 2846 | + | |
| 2847 | + | |
2834 | 2848 | | |
2835 | 2849 | | |
2836 | 2850 | | |
| |||
0 commit comments