No Fix-It for @main
struct without main static function
#58518
Labels
compiler
The Swift compiler itself
diagnostics QoI
Bug: Diagnostics Quality of Implementation
fix-its
Feature: diagnostic fix-its
improvement
type checker
Area → compiler: Semantic analysis
Uh oh!
There was an error while loading. Please reload this page.
When compiling the following code, you get an error message:
'Foo' is annotated with @main and must provide a main static function of type () -> Void, () throws -> Void, () async -> Void, or () async throws -> Void
We should offer a fix-it to add
I’m open to whether we should also suggest the
async
andthrows
variations but IMHO just offering the base variation without any modifiers would be a good starting point.rdar://92511524
The text was updated successfully, but these errors were encountered: