Commit b8e3122
committed
Fix macro expansion diagnostic for multi-binding variable declarations in MacroSystem
When there are no macro attributes attached to the visited `VariableDeclSyntax` node, proceed without performing any additional checks or transformations.
- Addressed the erroneous triggering of `MacroApplicationError.accessorMacroOnVariableWithMultipleBindings` diagnostic for nested multi-binding variable declarations.
- Added corresponding tests to validate the fix.
- Introduce fileprivate `NoOpMemberMacro`, extracted from `testCommentAroundeAttachedMacro` and used in 2 new tests.
Fixes #2133
rdar://1148368871 parent 71b7378 commit b8e3122
File tree
2 files changed
+55
-11
lines changed- Sources/SwiftSyntaxMacroExpansion
- Tests/SwiftSyntaxMacroExpansionTest
2 files changed
+55
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
606 | 606 | | |
607 | 607 | | |
608 | 608 | | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
609 | 613 | | |
610 | 614 | | |
611 | 615 | | |
| |||
Lines changed: 51 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
27 | 37 | | |
28 | 38 | | |
29 | 39 | | |
| |||
103 | 113 | | |
104 | 114 | | |
105 | 115 | | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | | - | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
132 | 172 | | |
133 | 173 | | |
134 | 174 | | |
| |||
0 commit comments