stdlib: fixit-based migrations for generic parameter renames

rdar://21538940

Swift SVN r29756
This commit is contained in:
Dmitri Hrybenko
2015-06-27 04:06:27 +00:00
parent 18cfd2ee17
commit 82122f9362
20 changed files with 280 additions and 2 deletions

View File

@@ -289,6 +289,9 @@ internal struct _SetElement<Element> {
public struct Set<Element : Hashable> :
Hashable, CollectionType, ArrayLiteralConvertible {
@available(*, unavailable, renamed="Element")
public typealias T = Element
internal typealias _Self = Set<Element>
internal typealias _VariantStorage = _VariantSetStorage<Element>
internal typealias _NativeStorage = _NativeSetStorage<Element>
@@ -3379,6 +3382,9 @@ public struct ${Self}Index<${TypeParametersDecl}> :
%if Self == 'Set':
internal typealias Key = ${TypeParameters}
internal typealias Value = ${TypeParameters}
@available(*, unavailable, renamed="Element")
public typealias T = Element
%end
internal var _value: ${Self}IndexRepresentation<${TypeParameters}>
@@ -3599,6 +3605,11 @@ public struct ${Self}Generator<${TypeParametersDecl}> : GeneratorType {
_Native${Self}StorageOwner<${TypeParameters}>
internal typealias _NativeIndex = _Native${Self}Index<${TypeParameters}>
%if Self == 'Set':
@available(*, unavailable, renamed="Element")
public typealias T = Element
%end
internal var _state: ${Self}GeneratorRepresentation<${TypeParameters}>
internal static func _Native(