Skip to content

Commit b9609a6

Browse files
committed
NFC: Clean up formatting and consistency a bit in attr_backDeploy.swift.
1 parent b205a9c commit b9609a6

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

test/attr/attr_backDeploy.swift

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,18 @@
33

44
// MARK: - Valid declarations
55

6-
// OK: top level functions
6+
// Ok, top level functions
77
@available(macOS 11.0, *)
88
@_backDeploy(before: macOS 12.0)
99
public func backDeployedTopLevelFunc() {}
1010

11-
// OK: internal decls may be back deployed when @usableFromInline
11+
// Ok, internal decls may be back deployed when @usableFromInline
1212
@available(macOS 11.0, *)
1313
@_backDeploy(before: macOS 12.0)
1414
@usableFromInline
1515
internal func backDeployedUsableFromInlineTopLevelFunc() {}
1616

17-
// OK: function/property/subscript decls in a struct
17+
// Ok, function/property/subscript decls in a struct
1818
public struct TopLevelStruct {
1919
@available(macOS 11.0, *)
2020
@_backDeploy(before: macOS 12.0)
@@ -53,7 +53,7 @@ public struct TopLevelStruct {
5353
}
5454
}
5555

56-
// OK: final function decls in a non-final class
56+
// Ok, final function decls in a non-final class
5757
public class TopLevelClass {
5858
@available(macOS 11.0, *)
5959
@_backDeploy(before: macOS 12.0)
@@ -72,7 +72,7 @@ public class TopLevelClass {
7272
public final class func backDeployedClassMethod() {}
7373
}
7474

75-
// OK: function decls in a final class
75+
// Ok, function decls in a final class
7676
final public class FinalTopLevelClass {
7777
@available(macOS 11.0, *)
7878
@_backDeploy(before: macOS 12.0)
@@ -83,20 +83,20 @@ final public class FinalTopLevelClass {
8383
public var backDeployedComputedProperty: Int { 98 }
8484
}
8585

86-
// OK: final function decls on an actor
86+
// Ok, final function decls on an actor
8787
@available(macOS 11.0, iOS 14.0, watchOS 7.0, tvOS 14.0, *)
8888
public actor TopLevelActor {
8989
@available(macOS 11.0, *)
9090
@_backDeploy(before: macOS 12.0)
9191
final public func finalActorMethod() {}
9292

93-
// OK: actor methods are effectively final
93+
// Ok, actor methods are effectively final
9494
@available(macOS 11.0, *)
9595
@_backDeploy(before: macOS 12.0)
9696
public func actorMethod() {}
9797
}
9898

99-
// OK: function decls in extension on public types
99+
// Ok, function decls in extension on public types
100100
extension TopLevelStruct {
101101
@available(macOS 11.0, *)
102102
@_backDeploy(before: macOS 12.0)
@@ -123,7 +123,8 @@ extension TopLevelProtocol {
123123
public func backDeployedExtensionMethod() {}
124124
}
125125

126-
// MARK: - Unsupported declaration types
126+
127+
// MARK: - Unsupported declaration kinds
127128

128129
@_backDeploy(before: macOS 12.0) // expected-error {{'@_backDeploy' attribute cannot be applied to this declaration}}
129130
public class CannotBackDeployClass {}
@@ -166,6 +167,7 @@ protocol CannotBackDeployProtocol {}
166167
@_backDeploy(before: macOS 12.0) // expected-error {{'@_backDeploy' attribute cannot be applied to this declaration}}
167168
public actor CannotBackDeployActor {}
168169

170+
169171
// MARK: - Function body diagnostics
170172

171173
public struct FunctionBodyDiagnostics {
@@ -188,6 +190,7 @@ public struct FunctionBodyDiagnostics {
188190
}
189191
}
190192

193+
191194
// MARK: - Incompatible declarations
192195

193196
@_backDeploy(before: macOS 12.0) // expected-error {{'@_backDeploy' may not be used on fileprivate declarations}}
@@ -243,7 +246,7 @@ public func alwaysEmitIntoClientFunc() {}
243246

244247
@available(macOS 11.0, *)
245248
@_backDeploy(before: macOS 12.0)
246-
@inlinable // OK
249+
@inlinable // Ok
247250
public func inlinableFunc() {}
248251

249252
@available(macOS 11.0, *)

0 commit comments

Comments
 (0)