Avatar
Avatar
Iceman
@swift-6.1.2 -swift-version 6 @MainActor func foo() { Task(executorPreference: globalConcurrentExecutor) { foo() } }
exit status 1 with stderr:<stdin>:3:7: error: expression is 'async' but is not marked with 'await' 1 | @MainActor func foo() { 2 | Task(executorPreference: globalConcurrentExecutor) { 3 | foo() | |- error: expression is 'async' but is not marked with 'await' | `- note: calls to global function 'foo()' from outside of its actor context are implicitly asynchronous 4 | } 5 | }