Commit Graph

266 Commits

Author SHA1 Message Date
Itai Ferber
d4e42c0dd1 Merge pull request #20225 from phausler/inline_data_and_dataprotocol
DataProtocol and new inline Data
2018-12-12 16:10:13 -08:00
Maxim Moiseev
7e211c6615 Use @unknown default in a switch over SCNGeometryPrimitiveType
<rdar://problem/39029889>
2018-12-12 13:51:50 -08:00
Philippe Hausler
d030354320 Initial draft of DataProtocol ContiguousCollection and new inline Data 2018-12-11 11:19:36 -08:00
Karoy Lorentey
ef392c1277 Merge pull request #21056 from lorentey/error-hashing
[Foundation] Update hashing for bridged NSError protocols
2018-12-11 13:17:00 +00:00
Stephen Canon
95d76cd195 Minor improvements to CGFloat (#21090)
* Minor improvements to CGFloat

Apparently init(exactly:) was never implemented for CGFloat, so let's fix that. Also includes minor cleanup for the .magnitude property.

* Add transparent annotations to some other CGFloat things.
2018-12-10 15:31:23 -05:00
Karoy Lorentey
23188afec1 [Foundation] CocoaError.Code, URLError.Code: Remove hashValue implementation
These implementations did not produce the same hash values as the raw value. RawRepresentable provides a correct hashing implementation by default, so let’s just use that.
2018-12-10 13:00:57 +00:00
Karoy Lorentey
21d31ea6d9 [Foundation] _Bridged[Stored]NSError: Remove explicit impls for hashValue/_rawHashValue
The compiler-synthesized / stdlib-provided default implementations seem perfectly fine for these.
2018-12-10 13:00:57 +00:00
Karoy Lorentey
bbaec3d8bd [Foundation] Update hashing for bridged Error/NSError types
Protocols in resilient libraries that wish to provide a default implementation of hashing need to do so by providing a hash(into:) implementation.

hashValue has been deprecated as a Hashable requirement in SE-0206. Implementing only it in a protocol extension curses conforming types to get deprecation warnings by default.
2018-12-10 13:00:56 +00:00
Pitiphong Phongpattranont
a75d98f68c Refactor the looking for existing container code and change the error message on the condition 2018-12-08 13:39:40 +07:00
Pitiphong Phongpattranont
d61830b266 Change the tab character to be space for the wrong indentation 2018-12-08 13:39:39 +07:00
Pitiphong Phongpattranont
80056e2fb9 Fixed the wrong indentation due to the GitHub editor 2018-12-08 13:39:39 +07:00
Pitiphong Phongpattranont
c7a2b31cd2 Fixed the wrong indentation 2018-12-08 13:39:39 +07:00
Pitiphong Phongpattranont
9a3038d3f0 Precondition for the mismatch container type when requesing for the nested container with the same key 2018-12-08 13:39:38 +07:00
Pitiphong Phongpattranont
1750e04186 Look up and reuse the container when asking for the nested container with the same key in PlistEncoder 2018-12-08 13:39:38 +07:00
Pitiphong Phongpattranont
32ef8773a2 Look up and reuse the container when asking for the nested container with the same key in JSONEncoder 2018-12-08 13:39:38 +07:00
Saleem Abdulrasool
41d9c2cc59 stdlib: restructure for OS family layout of SDK overlay
The SDK directory is now confusing as the Windows target also has a SDK
overlay.  In order to make this more uniform, move the SDK directory to
Darwin which covers the fact that this covers the XNU family of OSes.
The Windows directory contains the SDK overlay for the Windows target.
2018-12-06 11:32:05 -08:00