mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
16 lines
310 B
Swift
16 lines
310 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
|