You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use @main instead of top level code when initializing executable (#8371)
### Motivation:
Since `@main` is the general purpose way of marking the entry point to
executables, use it over top level code when generating an executable
template.
### Modifications:
Update the template output when the specified `--type` is executable.
### Result:
The template is now:
```swift
@main
struct MyProject {
static func main() {
print("Hello, world!")
}
}
```
This patch reverts
#6197 and
partially reverts
#6144
---------
Co-authored-by: David Nadoba <[email protected]>
Co-authored-by: Joseph Heck <[email protected]>
0 commit comments