Skip to content

Revert "[stdlib] Deprecate ContiguousArray (do not merge yet)" #4137

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 9, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions stdlib/public/core/Arrays.swift.gyb
Original file line number Diff line number Diff line change
Expand Up @@ -448,9 +448,6 @@ ${SelfDocComment}
% if Self != 'ArraySlice':
@_fixed_layout
%end
% if Self == 'ContiguousArray':
@available(*, deprecated, renamed: "Array")
%end
public struct ${Self}<Element>
: RandomAccessCollection,
MutableCollection,
Expand Down
2 changes: 1 addition & 1 deletion test/1_stdlib/Renames.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ func _Arrays<T>(e: T) {
// _ = Array(count: 1, repeatedValue: e) // xpected-error {{Please use init(repeating:count:) instead}} {{none}}
// The actual error is: {{argument 'repeatedValue' must precede argument 'count'}}

var a = ContiguousArray<T>() // expected-warning {{'ContiguousArray' is deprecated: renamed to 'Array'}} expected-note {{use 'Array' instead}}
var a = ContiguousArray<T>()
_ = a.removeAtIndex(0) // expected-error {{'removeAtIndex' has been renamed to 'remove(at:)'}} {{9-22=remove}} {{23-23=at: }} {{none}}
_ = a.replaceRange(0..<1, with: []) // expected-error {{'replaceRange(_:with:)' has been renamed to 'replaceSubrange(_:with:)'}} {{9-21=replaceSubrange}} {{none}}
_ = a.appendContentsOf([]) // expected-error {{'appendContentsOf' has been renamed to 'append(contentsOf:)'}} {{9-25=append}} {{26-26=contentsOf: }} {{none}}
Expand Down
4 changes: 2 additions & 2 deletions test/expr/cast/array_coerce.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ cs = ds // expected-error{{cannot assign value of type 'ArraySlice<D>' to type '
ds = cs // expected-error{{cannot assign value of type 'ArraySlice<C>' to type 'ArraySlice<D>'}}

// ContiguousArray<T>
var cna: ContiguousArray<C> = [c1] // expected-warning {{'ContiguousArray' is deprecated: renamed to 'Array'}} expected-note {{use 'Array' instead}}
var dna: ContiguousArray<D> = [d1] // expected-warning {{'ContiguousArray' is deprecated: renamed to 'Array'}} expected-note {{use 'Array' instead}}
var cna: ContiguousArray<C> = [c1]
var dna: ContiguousArray<D> = [d1]

cna = dna // expected-error{{cannot assign value of type 'ContiguousArray<D>' to type 'ContiguousArray<C>'}}
dna = cna // expected-error{{cannot assign value of type 'ContiguousArray<C>' to type 'ContiguousArray<D>'}}