Skip to content

Commit 72d5fb3

Browse files
committed
Merge remote-tracking branch 'origin/main' into rebranch
2 parents f93aa58 + e253ca9 commit 72d5fb3

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/expr/unary/async_await.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,13 @@ func testAsyncLet() async throws {
203203
_ = await x5
204204
}
205205

206+
func search(query: String) async throws -> [String] {
207+
let entities: [String] = []
208+
209+
async let r = entities.filter { $0.contains(query) }.map { String($0) }
210+
return await r
211+
}
212+
206213
// expected-note@+1 3{{add 'async' to function 'testAsyncLetOutOfAsync()' to make it asynchronous}} {{30-30= async}}
207214
func testAsyncLetOutOfAsync() {
208215
async let x = 1 // expected-error{{'async let' in a function that does not support concurrency}}

0 commit comments

Comments
 (0)