Commit 8d0d9d0
authored
[Debug] Add user friendly diagnostic when @DebugDescription is atached to a generic (#75302)
- **Explanation**:
Emit a user friendly diagnostic when `@DebugDescription` is attached to a generic type
definition.
- **Scope**:
This will not break existing code. Use of `@DebugDescription` previously produced an
unhelpful error diagnostic, this change makes the error diagnostic clear.
- **Original PRs**:
#75307
- **Risk**:
No risk.
- **Testing**:
Swift tests, CI
- **Reviewers**:
@hborla, @stephentyrone, @DougGregor1 parent 0558998 commit 8d0d9d0
File tree
3 files changed
+46
-3
lines changed- lib/Macros/Sources/SwiftMacros
- stdlib/public/core
- test/Macros/DebugDescription
3 files changed
+46
-3
lines changedLines changed: 33 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
20 | 46 | | |
21 | 47 | | |
22 | | - | |
| 48 | + | |
23 | 49 | | |
24 | 50 | | |
25 | 51 | | |
| |||
31 | 57 | | |
32 | 58 | | |
33 | 59 | | |
34 | | - | |
35 | | - | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
36 | 66 | | |
37 | 67 | | |
38 | 68 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| 67 | + | |
67 | 68 | | |
68 | 69 | | |
69 | 70 | | |
| |||
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
0 commit comments