We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 51a3de8 + 3038f9d commit e253ca9Copy full SHA for e253ca9
test/expr/unary/async_await.swift
@@ -203,6 +203,13 @@ func testAsyncLet() async throws {
203
_ = await x5
204
}
205
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
213
// expected-note@+1 3{{add 'async' to function 'testAsyncLetOutOfAsync()' to make it asynchronous}} {{30-30= async}}
214
func testAsyncLetOutOfAsync() {
215
async let x = 1 // expected-error{{'async let' in a function that does not support concurrency}}
0 commit comments