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
Copy file name to clipboardExpand all lines: docs/ReferenceGuides/UnderscoredAttributes.md
+7Lines changed: 7 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -830,3 +830,10 @@ the compiler.
830
830
831
831
This `async` function uses the pre-SE-0338 semantics of unsafely inheriting the caller's executor. This is an underscored feature because the right way of inheriting an executor is to pass in the required executor and switch to it. Unfortunately, there are functions in the standard library which need to inherit their caller's executor but cannot change their ABI because they were not defined as `@_alwaysEmitIntoClient` in the initial release.
832
832
833
+
## `@_spi_available(platform, version)`
834
+
835
+
Like `@available`, this attribute indicates a decl is available only as an SPI.
836
+
This implies several behavioral changes comparing to regular `@available`:
837
+
1. Type checker diagnoses when a client accidently exposes such a symbol in library APIs.
838
+
2. When emitting public interfaces, `@_spi_available` is printed as `@available(platform, unavailable)`.
839
+
3. ClangImporter imports ObjC macros `SPI_AVAILABLE` and `__SPI_AVAILABLE` to this attribute.
0 commit comments