When running this code from command line it works fine.
System Version: macOS 12.0 (21A5294g)
Tested Playgrounds both iOS and Mac platform. Both failed but the code is fine.
It is just a Playground issue.
Could someone make sure this bug was filed with the XCode Playgrounds team.
Post
Replies
Boosts
Views
Activity
@eskimo we know
async {
async let a = doIt()
async let b = doIt()
async let c = doIt()
async let d = doIt()
let results = await [a, b, c, d]
for result in results {
print(" \(result)")
}
}
will not run in a Playground. We need the bug fixed :-)
For me ... Testing - UI (Compose / SwiftUI) (instrument) & Unit & Integration & End2End & CI/ CD is very important. It is the foundation of Clean Arch.
And you are not thinking long term ??? KMM!
https://kotlinlang.org/lp/mobile/
https://kotlinlang.org/docs/multiplatform-mobile-integrate-in-existing-app.html#what-else-to-share
https://github.com/Kotlin/kmm-integration-sample/blob/master/app/src/main/java/com/jetbrains/simplelogin/androidapp/ui/login/LoginViewModel.kt
~Ash