mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
The lack of this condition made some jobs fail, e.g. https://ci.swift.org/job/oss-swift_tools-RA_stdlib-DA_test-device-non_executable/9749 rdar://162140584
17 lines
347 B
Swift
17 lines
347 B
Swift
// RUN: %target-run-simple-swift(-enable-experimental-feature ForExpressions) | %FileCheck %s
|
|
|
|
// REQUIRES: swift_feature_ForExpressions
|
|
// REQUIRES: executable_test
|
|
|
|
func f() -> String {
|
|
for (i, x) in "hello".enumerated() {
|
|
if i % 2 == 0 {
|
|
x.uppercased()
|
|
} else {
|
|
"*skip*"
|
|
|
|
}
|
|
}
|
|
}
|
|
print(f()) // CHECK: H*skip*L*skip*O
|