Sema, SILGen, ClangImporter: Add special support for Set<T>

Add the following functionality to the Swift compiler:

* covariant subtyping of Set
* upcasting, downcasting of Set
* automatic bridging between Set and NSSet, including
    * NSSet params/return values in ObjC are imported as Set<NSObject>
    * Set params/return values in Swift are visible to ObjC as NSSet

<rdar://problem/18853078> Implement Set<T> up and downcasting

Swift SVN r23751
This commit is contained in:
Chris Willmore
2014-12-06 02:52:33 +00:00
parent 748b04ac70
commit 36d0f187ec
29 changed files with 893 additions and 283 deletions

View File

@@ -372,6 +372,8 @@ StringRef swift::constraints::getName(ConversionRestrictionKind kind) {
return "[array-upcast]";
case ConversionRestrictionKind::DictionaryUpcast:
return "[dictionary-upcast]";
case ConversionRestrictionKind::SetUpcast:
return "[set-upcast]";
case ConversionRestrictionKind::BridgeToObjC:
return "[bridge-to-objc]";
case ConversionRestrictionKind::BridgeFromObjC: