Files
swift-mirror/test/Concurrency/async_main_mainactor_isolation.swift

19 lines
639 B
Swift

// RUN: %target-swift-frontend -target %target-swift-5.1-abi-triple -parse-as-library %s -emit-sil -o /dev/null -verify
// RUN: %target-swift-frontend -target %target-swift-5.1-abi-triple -parse-as-library %s -emit-sil -o /dev/null -verify -strict-concurrency=targeted
// RUN: %target-swift-frontend -target %target-swift-5.1-abi-triple -parse-as-library %s -emit-sil -o /dev/null -verify -strict-concurrency=complete
// REQUIRES: concurrency
// This should pass without any warnings or errors
@MainActor
var floofer: Int = 42
@main struct Doggo { }
extension Doggo {
static func main() {
print("Doggo value: \(floofer)")
}
}