Skip to content

Commit 2fa3892

Browse files
committed
Foundation: repair Darwin compatibility test suite
Explicitly convert the field to `Bool` from `DarwinBoolean` for encoding to ensure serialisability.
1 parent 653c070 commit 2fa3892

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
@@ -158,10 +158,10 @@ open class DateIntervalFormatter: Formatter {
158158

159159
let dateTemplateFromStylesNS = dateTemplateFromStyles?.takeRetainedValue()._nsObject
160160
aCoder.encode(dateTemplateFromStylesNS, forKey: "NS.dateTemplateFromStyles")
161-
162-
aCoder.encode(modified, forKey: "NS.modified");
163-
aCoder.encode(useTemplate, forKey: "NS.useTemplate")
164-
161+
162+
aCoder.encode(modified == true, forKey: "NS.modified");
163+
aCoder.encode(useTemplate == true, forKey: "NS.useTemplate")
164+
165165
let localeNS = locale?.takeRetainedValue()._nsObject
166166
aCoder.encode(localeNS, forKey: "NS.locale")
167167

0 commit comments

Comments
 (0)