Post

Replies

Boosts

Views

Activity

Reply to Async/let producing error in playground? Xcode 13.0 beta
@eskimo Feedback I have file a feedback FB9546874 Versions: The issue happens with Xcode Playground (iOS) Xcode: Version 13.0 beta 5 (13A5212g) macOS: 11.5.2 (20G95) Note: The same code runs fine in a SwiftUI project Code: import UIKit func f1() async -> Int { return 10 } Task { async let a = f1() async let b = f1() let c = await a + b print("c = \(c)") } Error: error: AsyncLet.playground:8:15: error: expression is 'async' but is not marked with 'await' async let a = f1() ^ await error: AsyncLet.playground:9:15: error: expression is 'async' but is not marked with 'await' async let b = f1() ^ await
Aug ’21
Reply to Swift Concurrency (async let) - Cancellation
@eskimo could you help with this, I am not sure if my understanding is wrong or if it is a bug
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Aug ’21
Reply to Async/let producing error in playground? Xcode 13.0 beta
@eskimo Feedback I have file a feedback FB9546874 Versions: The issue happens with Xcode Playground (iOS) Xcode: Version 13.0 beta 5 (13A5212g) macOS: 11.5.2 (20G95) Note: The same code runs fine in a SwiftUI project Code: import UIKit func f1() async -> Int { return 10 } Task { async let a = f1() async let b = f1() let c = await a + b print("c = \(c)") } Error: error: AsyncLet.playground:8:15: error: expression is 'async' but is not marked with 'await' async let a = f1() ^ await error: AsyncLet.playground:9:15: error: expression is 'async' but is not marked with 'await' async let b = f1() ^ await
Replies
Boosts
Views
Activity
Aug ’21