Skip to content

Commit d067ae2

Browse files
committed
Specify range type
1 parent 01fc8d8 commit d067ae2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Foundation/NSJSONSerialization.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ private struct JSONWriter {
532532
throw NSError(domain: NSCocoaErrorDomain, code: CocoaError.propertyListReadCorrupt.rawValue, userInfo: ["NSDebugDescription" : "NSDictionary key must be NSString"])
533533
}
534534
let options: NSString.CompareOptions = [.numeric, .caseInsensitive, .forcedOrdering]
535-
let range = a.startIndex ..< a.endIndex
535+
let range: Range<String.Index> = a.startIndex..<a.endIndex
536536
let locale = NSLocale.systemLocale()
537537

538538
return a.compare(b, options: options, range: range, locale: locale) == .orderedAscending

0 commit comments

Comments
 (0)