mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
18 lines
429 B
Swift
18 lines
429 B
Swift
// RUN: %empty-directory(%t)
|
|
// RUN: %target-build-swift %s -o %t/a.out4 -swift-version 4 && %target-codesign %t/a.out4 && %target-run %t/a.out4
|
|
// REQUIRES: executable_test
|
|
|
|
import StdlibUnittest
|
|
|
|
var tests = TestSuite("LazySlice")
|
|
|
|
tests.test("CommuteLazyness") {
|
|
let a = [1,2,3].lazy
|
|
let b = a[...]
|
|
var c = b.filter { $0 == 0 }
|
|
|
|
expectType(LazyFilterCollection<Slice<LazyCollection<[Int]>>>.self, &c)
|
|
}
|
|
|
|
runAllTests()
|