You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Move wrapper type into Test, make it an enum for ABIness, update documentation to tell devs not to use our typealias because it'll almost certainly break them in the future
/// A type that encapsulates test content records that produce instances of
15
+
/// ``Test``.
16
+
///
17
+
/// This type is necessary because such test content records produce an
18
+
/// indirect `async` accessor function rather than directly producing
19
+
/// instances of ``Test``, but functions are non-nominal types and cannot
20
+
/// directly conform to protocols.
21
+
///
22
+
/// - Note: This helper type must have the exact in-memory layout of the
23
+
/// `async` accessor function. Do not add any additional cases or associated
24
+
/// values. The layout of this type is [guaranteed](https://github.com/swiftlang/swift/blob/main/docs/ABI/TypeLayout.rst#fragile-enum-layout)
25
+
/// by the Swift ABI.
26
+
/* @frozen */ privateenum_Record:TestContent{
27
+
staticvartestContentKind:UInt32{
28
+
0x74657374
29
+
}
29
30
30
-
/// This instance's actual (asynchronous) accessor function.
31
-
varasyncAccessor:@Sendable()async->Test
32
-
}
31
+
/// The actual (asynchronous) accessor function.
32
+
case generator(@Sendable()async->Test)
33
+
}
33
34
34
-
extensionTest{
35
35
/// All available ``Test`` instances in the process, according to the runtime.
36
36
///
37
37
/// The order of values in this sequence is unspecified.
@@ -58,7 +58,12 @@ extension Test {
58
58
// Walk all test content and gather generator functions, then call them in
0 commit comments