mirror of
https://github.com/apple/swift.git
synced 2026-06-20 15:42:51 +02:00
df99de804d
When a type (class, enum, or struct) is annotated @main, it is required to provide a function with the following signature: static func main() -> () That function will be called when the executable the type is defined within is launched.
9 lines
123 B
Swift
9 lines
123 B
Swift
// RUN: %target-swift-frontend -typecheck -parse-as-library -verify %s
|
|
|
|
@main
|
|
class MyBase {
|
|
class func main() {
|
|
}
|
|
}
|
|
|