Skip to content

Commit 97de633

Browse files
committed
Foundation: repair Darwin compatibility test suite
Explicitly convert the field to `Bool` from `DarwinBoolean` for encoding to ensure serialisability.
1 parent bc3d278 commit 97de633

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Foundation/DateIntervalFormatter.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,10 +164,10 @@ open class DateIntervalFormatter: Formatter {
164164

165165
let dateTemplateFromStylesNS = dateTemplateFromStyles?.takeRetainedValue()._nsObject
166166
aCoder.encode(dateTemplateFromStylesNS, forKey: "NS.dateTemplateFromStyles")
167-
168-
aCoder.encode(modified, forKey: "NS.modified");
169-
aCoder.encode(useTemplate, forKey: "NS.useTemplate")
170-
167+
168+
aCoder.encode(modified == true, forKey: "NS.modified");
169+
aCoder.encode(useTemplate == true, forKey: "NS.useTemplate")
170+
171171
let localeNS = locale?.takeRetainedValue()._nsObject
172172
aCoder.encode(localeNS, forKey: "NS.locale")
173173

0 commit comments

Comments
 (0)