Skip to content

Commit 8bb7bc6

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 8bb7bc6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Foundation/DateIntervalFormatter.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,8 @@ open class DateIntervalFormatter: Formatter {
159159
let dateTemplateFromStylesNS = dateTemplateFromStyles?.takeRetainedValue()._nsObject
160160
aCoder.encode(dateTemplateFromStylesNS, forKey: "NS.dateTemplateFromStyles")
161161

162-
aCoder.encode(modified, forKey: "NS.modified");
163-
aCoder.encode(useTemplate, forKey: "NS.useTemplate")
162+
aCoder.encode(modified.boolValue, forKey: "NS.modified");
163+
aCoder.encode(useTemplate.boolValue, forKey: "NS.useTemplate")
164164

165165
let localeNS = locale?.takeRetainedValue()._nsObject
166166
aCoder.encode(localeNS, forKey: "NS.locale")

0 commit comments

Comments
 (0)