Files
swift-mirror/test/stdlib/freestanding_diags_nostdlib.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

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