Miscellaneous cleanups for array bridging in the type checker.

Use protocol conformance checks whenever we want to determine whether
a value type is bridged to an Objective-C class, which is simpler and
more robust. Clean up some of the type checker code around bridging,
using TypeBase::isEqual() to compare types and looking through type
sugar more regularly.

As part of this, move Array's conformance to
_ConditionallyBridgedToObjectiveC into the Foundation overlay. This
lets us use NSArray as the bridged type (which is clearer than using
CocoaArray), and follows what we're doing for dictionary bridging.


As part of this, move Array's bridged-to-


Swift SVN r17868
This commit is contained in:
Doug Gregor
2014-05-11 05:13:24 +00:00
parent 818595fa36
commit 9c03b4f924
6 changed files with 129 additions and 156 deletions

View File

@@ -40,7 +40,7 @@ const uint16_t VERSION_MAJOR = 0;
/// Serialized module format minor version number.
///
/// When the format changes IN ANY WAY, this number should be incremented.
const uint16_t VERSION_MINOR = 92;
const uint16_t VERSION_MINOR = 93;
using DeclID = Fixnum<31>;
using DeclIDField = BCFixed<31>;
@@ -1125,6 +1125,7 @@ namespace index_block {
Comparable,
_BridgedToObjectiveC,
_ConditionallyBridgedToObjectiveC,
};
using KnownProtocolLayout = BCGenericRecordLayout<