Commit 5080a3b 1 parent 6435a7e commit 5080a3b Copy full SHA for 5080a3b
File tree 2 files changed +10
-6
lines changed
2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -121,11 +121,15 @@ extension SyncMacro: PeerMacro {
121
121
guard let binding = declaration. bindings. first, declaration. bindings. count == 1 else {
122
122
throw SyncMacroError . unsupportedNumberOfBindings
123
123
}
124
+
125
+ guard let bindingIdentifier = binding. pattern. as ( IdentifierPatternSyntax . self) else {
126
+ throw SyncMacroError . invalidPattern
127
+ }
124
128
125
129
return [
126
130
"""
127
- /// The backing storage for the `` \( binding . trimmed) `` property.
128
- /// - Note: The value of this property is not synchronized with the parent. Use the `` \( binding . trimmed) `` property instead.
131
+ /// The backing storage for the `` \( bindingIdentifier . trimmed) `` property.
132
+ /// - Note: The value of this property is not synchronized with the parent. Use the `` \( bindingIdentifier . trimmed) `` property instead.
129
133
private var _ \( binding. trimmed)
130
134
"""
131
135
]
Original file line number Diff line number Diff line change @@ -45,8 +45,8 @@ final class SyncTests: XCTestCase {
45
45
}
46
46
}
47
47
48
- /// The backing storage for the ``foo: Int `` property.
49
- /// - Note: The value of this property is not synchronized with the parent. Use the ``foo: Int `` property instead.
48
+ /// The backing storage for the ``foo`` property.
49
+ /// - Note: The value of this property is not synchronized with the parent. Use the ``foo`` property instead.
50
50
private var _foo: Int
51
51
"""#
52
52
}
@@ -89,8 +89,8 @@ final class SyncTests: XCTestCase {
89
89
}
90
90
}
91
91
92
- /// The backing storage for the ``foo: Int? `` property.
93
- /// - Note: The value of this property is not synchronized with the parent. Use the ``foo: Int? `` property instead.
92
+ /// The backing storage for the ``foo`` property.
93
+ /// - Note: The value of this property is not synchronized with the parent. Use the ``foo`` property instead.
94
94
private var _foo: Int?
95
95
"""#
96
96
}
You can’t perform that action at this time.
0 commit comments