Commit f6b2e2e
authored
Fix invalid warning for enum cases named self (swiftlang#41520)
swiftlang#37992 introduced a warning when you
were likely to confuse `self` with `TypeName.self`, this also applied to
enum cases that were named `self`, these cases should not be easily
confused at call sites since their use requires prefixing them with a
`.`. There was also no way to avoid this warning since other syntax such
as `TypeName.self`, which produces the enum type instead, or
`` TypeName.`self` `` which produced the same warning again.
Fixes https://bugs.swift.org/browse/SR-156911 parent c22649e commit f6b2e2e
2 files changed
+19
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4748 | 4748 | | |
4749 | 4749 | | |
4750 | 4750 | | |
4751 | | - | |
4752 | 4751 | | |
4753 | | - | |
| 4752 | + | |
| 4753 | + | |
4754 | 4754 | | |
4755 | | - | |
4756 | | - | |
| 4755 | + | |
| 4756 | + | |
4757 | 4757 | | |
4758 | | - | |
| 4758 | + | |
4759 | 4759 | | |
4760 | | - | |
4761 | | - | |
| 4760 | + | |
| 4761 | + | |
4762 | 4762 | | |
4763 | | - | |
| 4763 | + | |
| 4764 | + | |
4764 | 4765 | | |
4765 | 4766 | | |
4766 | 4767 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
0 commit comments