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
19 lines
447 B
Swift
19 lines
447 B
Swift
// RUN: %target-swift-frontend \
|
|
// RUN: -concurrency-model=task-to-thread \
|
|
// RUN: -emit-sil \
|
|
// RUN: -verify %s
|
|
|
|
// REQUIRES: freestanding
|
|
|
|
import _Concurrency
|
|
|
|
actor Simple {}
|
|
|
|
actor Custom { // expected-error{{not permitted within task-to-thread concurrency model}}
|
|
let simple = Simple()
|
|
|
|
nonisolated var unownedExecutor: UnownedSerialExecutor {
|
|
return simple.unownedExecutor
|
|
}
|
|
}
|