Commit Graph

17 Commits

Author SHA1 Message Date
Philippe Hausler
017f664158 [Foundation] Ensure _SwiftNSCharacterSet overrides all abstract methods on NSCharacterSet via @objc
The override methods were not marked with @objc which incorrectly funneled to the abstract base class methods. In the method isSuperset(of:) it would incorrectly hit a requirement of a subclass implementation. This exposed a flaw with NSCharacterSet in which that method cannot recieve subclasses to the other CharacterSet being passed. This is being tracked via rdar://problem/27768939 which will need to be accounted for by CoreFoundation. Until such a time that can be addressed the workaround by using CFCharacterSetIsSupersetOfSet must be used with a copy passed as the other set.

This resolves:
https://bugs.swift.org/browse/SR-2307
2016-08-09 14:08:46 -07:00
Joe Groff
4b9e49827d Make all _toAnyHashable() implements @nonobjc. 2016-07-27 09:25:30 -07:00
Xin Tong
9709b0e510 Merge pull request #3662 from trentxintong/unicodescalar
SE-0128 - Change unicodescalar initializer to failable
2016-07-26 16:44:14 -07:00
Tony Parker
a0470750bb Merge pull request #3609 from phausler/CharacterSet_naming_changes
[Foundation] Update CharacterSet and NSCharacterSet punctuationCharac…
2016-07-26 09:41:47 -07:00
Dmitri Gribenko
34f6eb1438 Foundation: add custom AnyHashable representations to new value types 2016-07-26 03:10:52 -07:00
Jordan Rose
0712ffcb07 Convert the Dispatch and Foundation overlays to 'fileprivate'. (#3753)
Similar to the work in apple/swift-corelibs-foundation#445.

Groundwork for SE-0025 ('private' and 'fileprivate').
No intended functionality change.
2016-07-25 20:58:06 -07:00
Joe Groff
32b50c624d stdlib: Remove _isBridgedToObjectiveC from _ObjectiveCBridgeable.
All generic bridgeable types can bridge for all their instantiations now. Removing this ferrets out some now-unnecessary traps that check for unbridgeable parameter types.
2016-07-25 06:01:21 -07:00
Joe Groff
95e462022d Update Foundation overlay for id-as-Any. 2016-07-25 06:01:21 -07:00
Xin Tong
bbf86865d6 Change unicodescalar to failable
We were using a precondition which crashes the program when invalid input is
provided. We want to provide a way to gracefully check and handle invalid input
or shutdown the program if necessary.

SR-1930
2016-07-21 15:27:13 -07:00
Michael LeHew
f4f9be562d Merge branch 'master' of https://github.com/apple/swift 2016-07-19 17:06:02 -07:00
Philippe Hausler
e9cae7be79 [Foundation] Update CharacterSet and NSCharacterSet punctuationCharacters to more consistent naming
Addresses rdar://problem/26628434 Swift3: "whitespaces"?
2016-07-19 11:09:35 -07:00
Doug Gregor
ab3a15c87a [SE-0091 / Foundation overlay] Move operators into types.
Foundation provides a number of specific operators defined in the
global scope. Push all of these into their corresponding types. This
cleanup helps verify that the SE-0091 implementation is generally
functional.
2016-07-18 23:18:57 -07:00
Michael LeHew
a37120cb61 Ensure internal ObjC classes aren't exposed in archives.
We currently specify a few internal ObjC classes.  This commit ensures that they can not be accidentally exposed (and thus need to be supported) into the future. Luckily, NSData and NSDictionary/NSMutableDictionary already specify classForCoder in a general way. NSCharacterSet does not.

This commit also establishes unit tests to ensure all three types do not regress from this into the future.

Also, for completeness, it ensures classForArchiver and classForKeyedArchiver return appropriately as well.
2016-07-18 14:51:18 -07:00
Mishal Shah
23b646eed2 Update master to build with Xcode 8 beta 2, OS X 10.12, iOS 10, tvOS 10, and watchOS 3 SDKs 2016-07-06 10:48:45 -07:00
Philippe Hausler
07f0049e75 [Foundation] Override mutable copying for CharacterSet
Some mutation cases will cause the underlying copy on write cases to crash with a  _SwiftNSCharacterSet doesn't respond to -mutableCopyWithZone: failure.
Fixes Bugs:
https://bugs.swift.org/browse/SR-1782
<rdar://problem/26608216>
2016-06-20 08:02:08 -07:00
practicalswift
223d8d63f7 [gardening] Use "\"" instead of "“" or "”". 2016-06-15 22:54:11 +02:00
Mishal Shah
87b7bcfd3e Update master to build with Xcode 8 beta 1, OS X 10.12, iOS 10, tvOS 10, and watchOS 3 SDKs. 2016-06-14 14:53:55 -07:00