Unfortunately, we can't add an implicit conversion from
String to CFString, or anything analogous like string
literal support, without introducing ambiguities
when converting to AnyObject.
rdar://16271682
Swift SVN r18387
By beating the compiler into submission with a "bouncing through
non-methods" method, I have made it accept my crazed intention that
Array and friends should interoperate with all Sequences and
Collections! Filing <rdar://problem/16954833> to document the failure
of the method method.
Swift SVN r18378
This entry point is used when T is bridged verbatim and U is bridged
non-verbatim. It attempts to bridge each T from Objective-C to a U,
and returns nil if any of the elements cannot be bridged back to a U.
For now, only _convertNSArrayToArray and Array.bridgeFromObjectiveC
depend on this. It will soon be used for checked casts from, e.g.,
AnyObject[] to String[].
This is part of <rdar://problem/16952771> and general array bridging.
Swift SVN r18369
In a naive implementation of a Sequence adapter, adapting a
non-self-destructive (multi-pass) Sequence having a reference-semantics
Generator produces a self-destructive adapted view. This is technically
correct because Sequences are allowed to be self-destructive, and
theoretically every multi-pass Sequence would be a Collection. However
Sequences are much easier to build than Collections, so users are likely
to make them, and it would be extremely surprising if adapting a
self-preserving Sequence yielded a self-destructive one.
Swift SVN r18350
It was too easily confused with IndexingGenerator, which, come to think
of it may be obsolete. It's just a PermutationGenerator with
startIndex..endIndex in the indices sequence.
Swift SVN r18341
As declared, Dictionary's keys and values were private. Instead of
hiding Map away as _Map, give it a "nice" verbose name and expose it
through a "nice" lowercase global function called map(), which we
overload so it works on both Collections and Sequences, returning a
Collection when that's what it started on.
We'll follow this pattern for filter, which was requested on Array. The
implementation is easy once you have a lazy view!
Swift SVN r18340
Added a workaround for <rdar://problem/16953026> that allows them to
pass and flipped the sense of a test that was failing because we can now
downcast an Array that we couldn't downcast before.
Swift SVN r18319
conform to LogicValue.
This approach was taken to keep _isNull because I first tried
to just use comparisons to nil instead of isNull(). Apparently
that led to some circular definitions, so it was easier to just
stage it this way.
Swift SVN r18301
upcasts."
Reinstate "Restrict the array-bridged conversion to non-verbatim
bridging."
Reinstate "[stdlib] Fix T[].bridgeFromObjectiveC"
Reinstate "[stdlib] Fix T[].bridgeFromObjectiveC"
Reinstate "[stdlib] Move _arrayBridgedDownCast to Foundation"
Reinstate "Replace "can" with "cannot" in a message."
Reinstate "Implement support for non-verbatim T[] -> AnyObject[]
upcasts."
This reinstates commit r18291.
This reinstates commit r18290.
This reinstates commit r18288.
This reinstates commit r18287.
This reinstates commit r18286.
This reinstates commit r18293.
This reinstates commit r18283.
John fixed the issue in r18294.
Swift SVN r18299
Revert "Restrict the array-bridged conversion to non-verbatim bridging."
Revert "[stdlib] Fix T[].bridgeFromObjectiveC"
Revert "[stdlib] Fix T[].bridgeFromObjectiveC"
Revert "[stdlib] Move _arrayBridgedDownCast to Foundation"
Revert "Replace "can" with "cannot" in a message."
Revert "Implement support for non-verbatim T[] -> AnyObject[] upcasts."
This reverts commit r18291.
This reverts commit r18290.
This reverts commit r18288.
This reverts commit r18287.
This reverts commit r18286.
This reverts commit r18293.
This reverts commit r18283.
Sorry for the number of reverts, but I needed to do this many to get a clean
revert to r18283.
Swift SVN r18296
One of my recent type-checker changes starting passing all array
upcasts, including "bridged" ones like String[] -> AnyObject[],
through the library entry point _arrayUpCast, which is only meant for
class/ObjC existential types that are bridged verbatim.
Fixes part of <rdar://problem/16952238>; more cleanup to follow.
Swift SVN r18283
The new sugar is 'NSErrorPointer', which hides 'AutoreleasingUnsafePointer<NSError?>'.
I have not yet tested this on iOS, which previously had problems
with the type sugar import. I'll try and test that now.
Swift SVN r18270