Skip to content

Commit 756b03a

Browse files
authored
[Observation] Avoid using T since it is a common generic name, instead use a very specific generic return value name (#67207) (#67274)
1 parent a024d4c commit 756b03a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/Macros/Sources/ObservationMacros/ObservableMacro.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ public struct ObservableMacro {
5959
static func withMutationFunction(_ observableType: TokenSyntax) -> DeclSyntax {
6060
return
6161
"""
62-
internal nonisolated func withMutation<Member, T>(
62+
internal nonisolated func withMutation<Member, MutationResult>(
6363
keyPath: KeyPath<\(observableType), Member>,
64-
_ mutation: () throws -> T
65-
) rethrows -> T {
64+
_ mutation: () throws -> MutationResult
65+
) rethrows -> MutationResult {
6666
try \(raw: registrarVariableName).withMutation(of: self, keyPath: keyPath, mutation)
6767
}
6868
"""

0 commit comments

Comments
 (0)