Commit Graph

812 Commits

Author SHA1 Message Date
JP Simard
bb0af66904 fix mismatched closure open/close spacing in stdlib source 2016-12-31 18:21:05 -08:00
JP Simard
ea5b665afa prefer '-> Void' over '-> ()'
Apple and the Swift community has settled on this style:
https://devforums.apple.com/message/1133616#1133616

> FWIW, we've recently decided to standardize on () -> Void
> (generally, () for parameters and Void for return types) across all of our
> documentation.
2016-12-31 17:55:19 -08:00
JP Simard
bd34ea5e2d remove trailing semicolons in stdlib source 2016-12-31 17:51:18 -08:00
ben-cohen
c00485a0f7 use nil coalescing on URL.quarantineProperties { set } 2016-12-29 14:37:08 -08:00
ben-cohen
ce0d713cd6 fixed where clauses, Optional-as-Any and unused vars 2016-12-29 07:58:12 -08:00
Doug Gregor
3e7bab1b42 Clean up some uses of "as!" that were effectively just uses of "!".
We're going to start diagnosing these for bridging conversions, which
we weren't doing before.
2016-12-21 13:46:13 -08:00
Doug Gregor
255fdb1d61 Fix some bogus bridging casts that were allowed in Swift 3.
Swift 3 unintentionally allowed collection casts from, e.g.,
Set<AnyHashable> to Set<NSObject>, when in fact the object
representation of the AnyHashable might not be an NSObject. Fix up our
tests and overlays that ran afoul of this rule.
2016-12-21 13:46:13 -08:00
Philippe Hausler
b57752a67f [Foundation] Correct case of over-released data contents when specifying .none as a deallocator 2016-12-19 14:37:24 -08:00
Max Moiseev
3276aa5bcf Merge remote-tracking branch 'origin/master' into new-integer-protocols 2016-12-19 13:15:50 -08:00
practicalswift
16d6dce62e [gardening] Fix recently introduced typos. 2016-12-16 21:42:09 +01:00
Max Moiseev
bfbab798b9 Merge branch 'master' into new-integer-protocols 2016-12-13 14:43:31 -08:00
Slava Pestov
30c81e862f Foundation overlay: Fix resilient build 2016-12-12 14:05:50 -08:00
Max Moiseev
9b2f8858ec Merge branch 'master' into new-integer-protocols 2016-12-08 09:38:38 -08:00
Philippe Hausler
e8b19d9924 Merge pull request #6098 from phausler/additional_data_refinements
Merge the swift-corelibs-foundation version of Data
2016-12-06 15:16:51 -08:00
practicalswift
3e31a3ade4 [gardening] Fix typos. 2016-12-06 21:42:01 +01:00
Max Moiseev
356c15cb4a Merge remote-tracking branch 'origin/master' into new-integer-protocols 2016-12-06 10:35:27 -08:00
Philippe Hausler
6134083d31 Merge the swift-corelibs-foundation version of Data in as a single source and correct initializers for copy variants as well as remove defers of _fixLifetime 2016-12-06 10:12:55 -08:00
Philippe Hausler
4c2d6e24ff Merge pull request #5975 from phausler/data_performance
First draft at a new inlinable version of struct Data
2016-12-02 10:44:51 -08:00
Greg Parker
5001ee4645 Revert "Test and Fix: subset and superset for empty character set" (#6021) 2016-12-01 20:26:10 -08:00
Philippe Hausler
e27b2b0923 Account for nullability issues of bytes in NSData subclasses and return a placeholder value for now 2016-12-01 15:34:04 -08:00
MuhammadAnnaqeeb
e41a29a11c Fix subset and superset for empty character set (#6000)
Fix isSubset() and isSuperset() involving the empty CharacterSet.
2016-12-01 14:43:25 -08:00
Philippe Hausler
bdafb2dac0 Handle no-copy cases and custom deallocators as inline construction of swift Data 2016-12-01 12:27:57 -08:00
Max Moiseev
3059b3cdd1 Merge branch 'master' into new-integer-protocols 2016-11-30 10:45:10 -08:00
Tony Parker
66a1aaa8ed Clarify a few comments on autoupdating vs current for TimeZone, Calendar, and Locale 2016-11-30 08:12:17 -08:00
Philippe Hausler
9c0951b5b2 First draft at a new inlinable version of struct Data 2016-11-29 10:53:44 -08:00
Max Moiseev
70b2343626 Merge branch 'master' into new-integer-protocols 2016-11-28 15:25:01 -08:00
practicalswift
797b80765f [gardening] Use the correct base URL (https://swift.org) in references to the Swift website
Remove all references to the old non-TLS enabled base URL (http://swift.org)
2016-11-20 17:36:03 +01:00
Max Moiseev
97981907e1 Merge branch 'master' into new-integer-protocols 2016-11-18 09:36:02 -08:00
Tony Parker
dcb027e683 Remove a "fix-it" overload of URL.resourceValues(forKeys:).
Even though this overload is always unavailable, the compiler was
confusing it with the real one, causing ambiguous error messages.

Fixes SR-3144.
2016-11-17 16:28:52 -08:00
Max Moiseev
953d919a22 Merge branch 'master' into new-integer-protocols 2016-11-16 14:46:31 -08:00
Doug Coleman
692bc1c031 cmake: Allow requiring minimum versions using sdk-os-version triples on
Darwin.

Example:
--darwin-sdk-deployment-targets=fookit-ios-8.0;barkit-tvos-9.2
2016-11-15 16:43:37 -08:00
Max Moiseev
92813be403 Merge branch 'master' into new-integer-protocols 2016-11-11 16:14:57 -08:00
Tony Parker
8f8f6fd5f3 Fix AffineTransform initializer 2016-11-07 14:02:08 -08:00
Janek Spaderna
d5e1819416 [stdlib] Don't try to construct invalid UnicodeScalars
When inserting a closed range/creating a CharacterSet from a closed
range we must not try to convert this range to a half open one by
incrementing the upperBound UnicodeScalar because not all integer values
are valid values for UnicodeScalar

Fixes SR-2988
2016-11-02 12:20:31 +01:00
Max Moiseev
76e0a99a37 Merge branch 'master' into new-integer-protocols 2016-10-31 09:29:19 -07:00
practicalswift
cc852042c9 [gardening] Fix accidental trailing whitespace. 2016-10-29 10:22:58 +02:00
Max Moiseev
3d4f00091d Merge remote-tracking branch 'origin/master' into new-integer-protocols 2016-10-28 15:55:40 -07:00
Kevin Perry
6f83a82d14 Ensure directory URL enumerator error handler block is invoked with non-nil URL 2016-10-26 16:18:51 -07:00
Max Moiseev
8912dc09a8 Merge branch 'master' into new-integer-protocols 2016-10-20 13:55:03 -07:00
Kevin Perry
66ae38c5e0 1. Use correct URLs in thunk
2. Pass NSString? to thunk, not String?
3. Use proper Objective-C out parameter coding practices
4. Use correct nullability decorator in thunk for backupItemName parameter

rdar://problem/28755011
2016-10-18 16:40:46 -07:00
Max Moiseev
b2fecd241b Merge branch 'master' into new-integer-protocols 2016-10-18 11:00:46 -07:00
Slava Pestov
2b1bfe3270 Foundation overlay: Don't rely on URL struct being a single reference
If the struct is resilient, it is passed indirectly. Even if we decide to
make it fixed layout, it's best to remove as many implicit ABI assumptions
as possible from @_silgen_name function calls.

Fixes <rdar://problem/28673618>.
2016-10-17 18:10:37 -07:00
swift-ci
781ee82cf6 Merge pull request #5085 from phausler/Foundation_cleanup 2016-10-17 11:45:36 -07:00
Max Moiseev
8d1155c2b9 Merge remote-tracking branch 'origin/master' into new-integer-protocols 2016-10-17 11:29:07 -07:00
swift-ci
4532e20021 Merge pull request #5125 from parkera/parkera/url_quarantine_fix 2016-10-13 12:29:14 -07:00
Max Moiseev
2190819e99 Breaking up complex expression to improve compilation time 2016-10-12 15:04:54 -07:00
Xiaodi Wu
7041b4b2bf [SR-2503] Implement subtraction for CharacterSet (#5201)
* Implement CharacterSet.subtracting(_:)

* Add test for CharacterSet.subtract(_:)

* Expand on test for CharacterSet.subtract(_:)

* Address reviewer comment (CharacterSet tests)

* Improve documentation for CharacterSet set algebra
2016-10-11 15:26:56 -07:00
Max Moiseev
5cc2c8cb5a Operators as static funcs for Arithmetic (see SE-0091) 2016-10-10 14:04:11 -07:00
Max Moiseev
99837a47a5 Merge branch 'master' into new-integer-protocols 2016-10-05 15:26:37 -07:00
Tony Parker
15d5875bf3 Fix quarantineProperty in URLResourceValues
NSURL has an odd behavior around the quarantine dictionary URL resource
value - if you want to clear it, you should pass NSNull instead of the
NSDictionary. We need to accomodate that in the overlay code with a
special case.

<rdar://problem/28575806> Cannot remove Quarantine attribute in Swift 3
2016-10-04 15:58:57 -07:00