mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
In this mode, the following are disabled: - task creation - global actors - MainActor - custom executors
23 lines
549 B
Swift
23 lines
549 B
Swift
// RUN: %target-swift-frontend \
|
|
// RUN: -concurrency-model=task-to-thread \
|
|
// RUN: -typecheck \
|
|
// RUN: -verify %s
|
|
|
|
// REQUIRES: freestanding
|
|
|
|
import _Concurrency
|
|
|
|
actor Simple {}
|
|
|
|
@globalActor // expected-error{{not permitted within task-to-thread concurrency model}}
|
|
class Goo {
|
|
typealias ActorType = Simple
|
|
|
|
static var shared : Simple { fatalError() }
|
|
}
|
|
|
|
@main struct Main {
|
|
static func main() async throws {} // expected-error{{not permitted within task-to-thread concurrency model}}
|
|
}
|
|
|