Skip to content

Commit 851b46f

Browse files
committed
[test] Restore test and remove old portion
1 parent 192954c commit 851b46f

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

test/stdlib/UnavailableStringAPIs.swift.gyb

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
// RUN: %gyb -D_runtime=%target-runtime %s -o %t/main.swift
33
// RUN: %line-directive %t/main.swift -- %target-swift-frontend -typecheck -verify %t/main.swift
44

5-
// REQUIRES: rdar44572521
6-
75
func test_StringSubscriptByInt(
86
x: String,
97
i: Int,
@@ -15,13 +13,6 @@ func test_StringSubscriptByInt(
1513
_ = x[r2] // expected-error {{'subscript(_:)' is unavailable: cannot subscript String with an integer range, see the documentation comment for discussion}} {{none}}
1614
}
1715

18-
% if _runtime == 'objc':
19-
func test_UTF16ViewSubscriptByInt(x: String.UTF16View, i: Int, r: Range<Int>) {
20-
_ = x[i] // expected-error {{'subscript(_:)' is unavailable: Indexing a String's UTF16View requires a String.UTF16View.Index, which can be constructed from Int when Foundation is imported}} {{none}}
21-
_ = x[r] // expected-error {{'subscript(_:)' is unavailable: Slicing a String's UTF16View requires a Range<String.UTF16View.Index>, String.UTF16View.Index can be constructed from Int when Foundation is imported}} {{none}}
22-
}
23-
% end
24-
2516
func test_UTF8View(s: String.UTF8View, i: String.UTF8View.Index, d: Int) {
2617
_ = s.index(after: i) // OK
2718
_ = s.index(before: i) // OK

0 commit comments

Comments
 (0)