@Bindable does not resolve to correct @Perception.Bindable? #17
VladOrackle
started this conversation in
General
Replies: 1 comment
-
Hi @VladOrackle, this does seem to be some kind of Swift bug, and I'm not sure there is anything we can do to work around it. FWIW, if you had use struct ContentView: View {
// 🛑 'Bindable' is ambiguous for type lookup in this context
@Bindable var model: CounterModel
…
} Since this isn't an issue with the library I am going to convert it to a discussion. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
This problem is kind of strange, because I can safely write
@Bindable
even on iOS 15 but then the compiler argues that it can't find the model object. If I write the full@Perception.Bindable
or use a typealias it works as expected. I suspect that it is an Xcode bug, but I might be wrong.Checklist
main
branch of this package.Expected behavior
@bindable works without warnings
Actual behavior
@bindable works without warnings only if we use the full name provided by the library
Steps to reproduce
Use @perceptible model and try to use @bindable inside views body
Perception version information
1.0.0
Destination operating system
iOS 15
Xcode version information
15.2
Swift Compiler version information
Beta Was this translation helpful? Give feedback.
All reactions