CGFloat is 32-bit on 32-bit architectures and 64-bit on 64-bit
architectures for historical reasons. Rather than having it alias
either Float (32-bit) or Double (64-bit), introduce a distinct struct
type for CGFloat. CGFloat provides a complete set of comparisons and
arithmetic operators (including tgmath functions), initializers allows
explicit conversion between it an Int, UInt, Float, and Double, as
well as conforming to all of the protocols that Float/Double do.
This formulation of CGFloat makes use of CGFloat
architecture-independent, although it still requires a number of casts.
Fixes <rdar://problem/17224725>
Swift SVN r19689
The chosen display mode is using the integer UTF16-based position as the thing to display
This is what would also be displayed by default, except it would show up as {{_position 0},{...}}
Now we avoid exposing the internals, and just essentially coalesce the Index with its numeric value
Swift SVN r19670
Feedback from Dave and Dmitri - the Mirrors.gyb file is now split in three parts:
- Boilerplate, the value, valueType, objectIdentifier and disposition properties
- Decl, the type declaration proper, with no opening brace
- Conformance, the extension that provides Reflectable conformance on the original type
This is substantially no feature change, but it should make for easier editing, and a generally more readable experience
Swift SVN r19637
...because you can't match them properly in switches.
In the future, we could consider allowing private enum cases in a
resilient public enum, which essentially forces the user to consider the
default case.
Swift SVN r19620
Enum cases can't be less public than the enum type in 1.0, so add a trivial
layer of indirection to these types so the "enum-ness" is internal while the
type itself remains public.
Swift SVN r19619
Previously, bridged value types and their corresponding Objective-C
classes allow inter-conversion via a number of user-defined conversion
functions in the Foundation module. Instead, make this a general
feature of the type checker so we can reason about it more
directly. Fixes <rdar://problem/16956098> and
<rdar://problem/17134986>, and eliminates 11 (half) of the
__conversion functions from the standard library and overlays.
A few notes:
- The XCTest changes are because a String can no longer directly
conform to CVarArg: this is a Good Thing (TM), because it should be
ambiguous: did you mean to pass it as an NSString or a C string?
- The Objective-C representations for the bridged collections are
hard-coded in the type checker. This is unfortunate and can be
remedied by adding another associated type to the
_BridgedToObjectiveC protocol.
Swift SVN r19618
It is completely unused, and I am not even convinced it is safe. It
assumes that size of ImplicitlyUnwrappedOptional<T> is equal to pointer
size (while this is true for Objective-C pointer types, there was no
precondition that enforced this).
Swift SVN r19604