Fix default encoders for top-level values

This commit is contained in:
John Estropia committed 2020-01-21 17:03:12 +09:00
1 parent 92ad895044
commit e9c3312612
7 files changed
+256 -83

No files matched your search

+2 -1
View File
@@ -114,7 +114,8 @@ class Person: CoreStoreObject {
var customField: CustomType
@Field.Coded(
"job", coder: (
"job",
coder: (
encode: { $0.toData() },
decode: { $0.flatMap(Job.init(data:)) ?? .unemployed }
)