From ee008e1e8196b1a29da9341fbb6e28a7177cda04 Mon Sep 17 00:00:00 2001 From: Brandon Williams <135203+mbrandonw@users.noreply.github.com> Date: Fri, 17 Oct 2025 14:07:24 -0500 Subject: [PATCH] Fix warnings from existential and deprecation (#3800) * Use explicit 'any' for existential. * Fix deprecation warning. --- Sources/ComposableArchitecture/Effect.swift | 2 +- Sources/ComposableArchitecture/Macros.swift | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Sources/ComposableArchitecture/Effect.swift b/Sources/ComposableArchitecture/Effect.swift index bfd4c734f23b..b71f9e56b410 100644 --- a/Sources/ComposableArchitecture/Effect.swift +++ b/Sources/ComposableArchitecture/Effect.swift @@ -423,7 +423,7 @@ extension Effect { name: String?, priority: TaskPriority? = nil, operation: @escaping @Sendable () async throws -> Success - ) where Failure == Error { + ) where Failure == any Error { self.init(priority: priority, operation: operation) } } diff --git a/Sources/ComposableArchitecture/Macros.swift b/Sources/ComposableArchitecture/Macros.swift index 036387628e4c..dfa01b5f4f19 100644 --- a/Sources/ComposableArchitecture/Macros.swift +++ b/Sources/ComposableArchitecture/Macros.swift @@ -56,6 +56,7 @@ public macro Reducer(state: _SynthesizedConformance..., action: _SynthesizedConf #endif public struct _SynthesizedConformance: Sendable {} +@available(*, deprecated, message: "Define your conformance using an extension, instead") extension _SynthesizedConformance { /// Extends the `State` or `Action` types that ``Reducer()`` creates with the `Codable` /// protocol.