mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Test that @abi handles SendableMetatype
The `@abi` checker ignores uses of marker protocols, as they don’t have any impact on call compatibility. Add tests to ensure that this rule encompasses SE-0470’s `SendableMetatype`. Fixes rdar://152602566.
This commit is contained in:
@@ -992,18 +992,18 @@ func fnExtInfoTest(
|
||||
// FIXME: Not sure how to reach tryNormalizeOutermostType() generic func
|
||||
|
||||
@abi(
|
||||
func testMarkerProtocols<A, B: Sendable>(
|
||||
_: A, _: B,
|
||||
_: Any, _: Sendable,
|
||||
_: AnyKeyPath, _: AnyKeyPath & Sendable,
|
||||
_: Any, _: Sendable & BitwiseCopyable
|
||||
func testMarkerProtocols<A, B: Sendable, C, D: SendableMetatype>(
|
||||
_: A, _: B, _: C, _: D,
|
||||
_: Any, _: Sendable, _: Any, _: SendableMetatype,
|
||||
_: AnyKeyPath, _: AnyKeyPath & Sendable, _: AnyKeyPath, _: AnyKeyPath & SendableMetatype,
|
||||
_: Any, _: Sendable & BitwiseCopyable, _: Any, _: SendableMetatype & BitwiseCopyable
|
||||
)
|
||||
)
|
||||
func testMarkerProtocols<A: Sendable, B>(
|
||||
_: A, _: B,
|
||||
_: Sendable, _: Any,
|
||||
_: AnyKeyPath & Sendable, _: AnyKeyPath,
|
||||
_: Sendable & BitwiseCopyable, _: Any
|
||||
func testMarkerProtocols<A: Sendable, B, C: SendableMetatype, D>(
|
||||
_: A, _: B, _: C, _: D,
|
||||
_: Sendable, _: Any, _: SendableMetatype, _: Any,
|
||||
_: AnyKeyPath & Sendable, _: AnyKeyPath, _: AnyKeyPath & SendableMetatype, _: AnyKeyPath,
|
||||
_: Sendable & BitwiseCopyable, _: Any, _: SendableMetatype & BitwiseCopyable, _: Any
|
||||
) {}
|
||||
|
||||
@abi(
|
||||
|
||||
Reference in New Issue
Block a user