[SR-15600] Error message for @main types without static func main()
should mention possibility of async
#57903
Labels
static func main()
should mention possibility of async
#57903
Additional Detail from JIRA
md5: 82dd3146ac564860ac5ac0f42caf506e
Issue Description:
When annotating a type with
@main
without providing an appropriate method to run, the compiler emits the following error:But actually, it’s now also valid to add
async
there. This would help discoverability of this feature. Although I’m not sure adding all four possible combinations of nothing/throws
/async
is the best thing to do here.To reproduce, compile this code:
I’m using Xcode 13.2 with Swift 5.5.2.
The text was updated successfully, but these errors were encountered: