When a reducer contains BindingState/BindableAction but a SwiftUI view doesn't use this, the compiler complains about ambiguous init. (The use case for this may be that this SwiftUI view doesn't need the binding, but a child view does.)
> xcrun swiftc --version
swift-driver version: 1.82.2 Apple Swift version 5.9 (swiftlang-5.9.0.114.10 clang-1500.0.29.1)
Target: arm64-apple-macosx13.0
Description
When a reducer contains BindingState/BindableAction but a SwiftUI view doesn't use this, the compiler complains about ambiguous init. (The use case for this may be that this SwiftUI view doesn't need the binding, but a child view does.)
I've written a test that shows this here: https://github.com/johankool/swift-composable-architecture/tree/ambiguous_viewstore
Checklist
main
branch of this package.Expected behavior
It compiles just fine.
Actual behavior
Ambiguous use of 'init(_:observe:content:file:line:)'
Steps to reproduce
The Composable Architecture version information
a4d371e8adc9d081d616f988fb0f089b479e9553 (current prerelease/1.0 branch)
Destination operating system
iOS 16.4
Xcode version information
Version 14.3.1 (14E300c)
Swift Compiler version information