- Notifications
You must be signed in to change notification settings - Fork 10.5k
/
Copy pathasync_task_groups_as_sequence.swift
22 lines (18 loc) · 1.24 KB
/
async_task_groups_as_sequence.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// RUN: %target-swift-frontend -target %target-swift-5.1-abi-triple %s -emit-sil -o /dev/null -verify
// RUN: %target-swift-frontend -target %target-swift-5.1-abi-triple %s -emit-sil -o /dev/null -verify -strict-concurrency=targeted
// RUN: %target-swift-frontend -target %target-swift-5.1-abi-triple %s -emit-sil -o /dev/null -verify -strict-concurrency=complete
// RUN: %target-swift-frontend -target %target-swift-5.1-abi-triple %s -emit-sil -o /dev/null -verify -strict-concurrency=complete -enable-upcoming-feature RegionBasedIsolation
// REQUIRES: concurrency
// REQUIRES: libdispatch
// REQUIRES: swift_feature_RegionBasedIsolation
@available(SwiftStdlib 5.1,*)
@rethrows
protocolTGP:AsyncSequence,AsyncIteratorProtocol{}
@available(SwiftStdlib 5.1,*)
extensionTaskGroup:TGP{}
// expected-warning@-1{{extension declares a conformance of imported type 'TaskGroup' to imported protocol 'AsyncIteratorProtocol'}}
// expected-note@-2{{add '@retroactive' to silence this warning}}
@available(SwiftStdlib 5.1,*)
extensionThrowingTaskGroup:TGP{}
// expected-warning@-1{{extension declares a conformance of imported type 'ThrowingTaskGroup' to imported protocol 'AsyncIteratorProtocol'}}
// expected-note@-2{{add '@retroactive' to silence this warning}}