Skip to content
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

Encodable RawRepresentable enums do not conform to DefaultsSerializable #250

Open
nikans opened this issue May 23, 2020 · 4 comments
Open

Comments

@nikans
Copy link

nikans commented May 23, 2020

Screenshot 2020-05-23 at 04 45 39

It's ok if the raw representable enum type only conforms to Decodable, though.

@vBoykoGit
Copy link

Any solution here?

@sunshinejr
Copy link
Owner

@nikans @vBoykoGit please take a look at #206 and let me know if it helps!

@huybuidac
Copy link

@nikans @vBoykoGit please take a look at #206 and let me know if it helps!

I'm facing the same problem and this also doesn't work. Can you help :(

image

@sunshinejr
Copy link
Owner

sunshinejr commented Aug 19, 2020

@huybuidac you need to also define _defaultsArray in addition to _defaults to fully implement the DefaultsSerializable protocol, e.g.:

public static var _defaults: DefaultsCodableBridge<Self> { return DefaultsCodableBridge() }
public static var _defaultsArray: DefaultsCodableBridge<[Self]> { return DefaultsCodableBridge() }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants