mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
With the introduction of `next(isolation:)` into the task group types, we removed the public APIs for the no-argument `next()` versions, leaving them only as `@usableFromInline internal` entrypoints for the ABI. Because the `next(isolation:)` versions have a default argument, this was sufficient for providing source compatibility for calls, but not for protocol conformances. Bring these APIs back publicly. Fixes rdar://127499568.
23 lines
1.2 KiB
Swift
23 lines
1.2 KiB
Swift
// RUN: %target-swift-frontend -disable-availability-checking %s -emit-sil -o /dev/null -verify
|
|
// RUN: %target-swift-frontend -disable-availability-checking %s -emit-sil -o /dev/null -verify -strict-concurrency=targeted
|
|
// RUN: %target-swift-frontend -disable-availability-checking %s -emit-sil -o /dev/null -verify -strict-concurrency=complete
|
|
// RUN: %target-swift-frontend -disable-availability-checking %s -emit-sil -o /dev/null -verify -strict-concurrency=complete -enable-upcoming-feature RegionBasedIsolation
|
|
|
|
// REQUIRES: concurrency
|
|
// REQUIRES: asserts
|
|
// REQUIRES: libdispatch
|
|
|
|
@available(SwiftStdlib 5.1, *)
|
|
@rethrows
|
|
protocol TGP: AsyncSequence, AsyncIteratorProtocol { }
|
|
|
|
@available(SwiftStdlib 5.1, *)
|
|
extension TaskGroup: 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, *)
|
|
extension ThrowingTaskGroup: 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}}
|