Files
swift-mirror/test/stdlib/freestanding_diags_stdlib2.swift
Nate Chandler 68eea8adec [TaskToThread] No unstructured tasks.
In this mode, the following are disabled:

- task creation
- global actors
- MainActor
- custom executors
2022-07-06 11:51:16 -07:00

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
}
}