mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
- 1..3 now means 1,2 - 1...3 now means 1,2,3 Implements <rdar://problem/16839891> Swift SVN r18066
16 lines
307 B
Swift
16 lines
307 B
Swift
// RUN: %target-run-simple-swift | FileCheck %s
|
|
|
|
func test(s: String)
|
|
{
|
|
println(s)
|
|
var s2 = s[advance(s.startIndex, 2)..advance(s.startIndex, 4)]
|
|
println(s2)
|
|
var s3 = s2[s2.startIndex..s2.startIndex]
|
|
var s4 = s3[s2.startIndex..s2.startIndex]
|
|
}
|
|
|
|
test("some text")
|
|
|
|
// CHECK: some text
|
|
// CHECK: me
|