-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'Decodable' naming conflict in Swift 4 #148
Comments
I've seen the same - the compiler is unable to distinguish Decodable as either Swift.Decodable or Decodable.Decodable. Specifying Decodable.Decodable doesn't help in this case - this may be a compiler issue as I feel this should work (happy to be corrected on this!) |
Looks like this lib is going to have to do the Enum namespace hack, and come up with something besides |
You can work around this issue (for now) by importing just the protocol before importing the whole module:
This allows this struct to compile:
Obvious caveats here, this might just be an implementation detail of Swift 4 and might stop working on the next Xcode 9 beta release. |
Doing |
What about |
|
Weird, tried that and got an error, it works fine now tho. Thanks @nap-sam-dean! 🍻 |
FYI I opened a ticket in JIRA when I first got this error 😄 |
It build and runs with this solution. If I try to Profile my app - profiling stops at |
Swift 4 includes a built in
Decodable
protocol. Tried to build my project in Swift 4/Xcode 9 and got naming conflicts all over the place.Obviously, it's early, but wanted to bring this to everyone's attention! I'm not sure what development of this library will look like in the future but figured this issue could begin that conversation.
Thanks!
The text was updated successfully, but these errors were encountered: